diff --git a/application/controllers/User.php b/application/controllers/User.php index 00c9d59b..aa1c1e4b 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -62,7 +62,7 @@ class User extends CI_Controller { } else { - switch($this->user_model->add($this->input->post('user_name'), $this->input->post('user_password'), $this->input->post('user_email'), $this->input->post('user_type'), $this->input->post('user_firstname'), $this->input->post('user_lastname'), $this->input->post('user_callsign'), $this->input->post('user_locator'), $this->input->post('user_timezone'))) { + switch($this->user_model->add($this->input->post('user_name'), $this->input->post('user_password'), $this->input->post('user_email'), $this->input->post('user_type'), $this->input->post('user_firstname'), $this->input->post('user_lastname'), $this->input->post('user_callsign'), $this->input->post('user_locator'), $this->input->post('user_timezone'), $this->input->post('user_measurement_base'), $this->input->post('user_date_format'))) { // Check for errors case EUSERNAMEEXISTS: $data['username_error'] = 'Username '.$this->input->post('user_name').' already in use!'; diff --git a/application/models/User_model.php b/application/models/User_model.php index e751f308..c83d0c7d 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -96,7 +96,7 @@ class User_Model extends CI_Model { // FUNCTION: bool add($username, $password, $email, $type) // Add a user - function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone) { + function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone, $measurement, $user_date_format) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -108,7 +108,9 @@ class User_Model extends CI_Model { 'user_lastname' => xss_clean($lastname), 'user_callsign' => xss_clean($callsign), 'user_locator' => xss_clean($locator), - 'user_timezone' => xss_clean($timezone) + 'user_timezone' => xss_clean($timezone), + 'user_measurement_base' => xss_clean($measurement), + 'user_date_format' => xss_clean($user_date_format), ); // Check the password is valid diff --git a/application/views/user/add.php b/application/views/user/add.php index 3284b586..49de4cfe 100644 --- a/application/views/user/add.php +++ b/application/views/user/add.php @@ -19,68 +19,83 @@
-
- +
+ - ".$username_error."
"; } ?> -
+ ".$username_error.""; } ?> + -
- +
+ + config->item('auth_level'); + while (list($key, $val) = each($levels)) { + ?> + + +
-
- - - ".$email_error."
"; } ?> -
+
+ + + ".$email_error."
"; } ?> + -
- +
+ ".$password_error."
"; } ?> -
+ -
- +
+ - ".$firstname_error."
"; } ?> -
+ ".$firstname_error.""; } ?> + -
+
- ".$lastname_error."
"; } ?> -
+ ".$lastname_error.""; } ?> + -
+
- ".$callsign_error."
"; } ?> -
+ ".$callsign_error.""; } ?> + -
+
- ".$locator_error."
"; } ?> -
+ ".$locator_error.""; } ?> + -
+
-
+
+ +
+ + + + Select how you would like dates shown when logged into your account. +
+
@@ -93,11 +108,11 @@ Choose which unit distances will be shown in.
- - + +
- \ No newline at end of file + diff --git a/application/views/user/edit.php b/application/views/user/edit.php index 2deb1d30..c5e48b54 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -140,6 +140,8 @@ + + Select how you would like dates shown when logged into your account.