mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[User] Added missing logic to actually save date format and also measurement when creating a user
This commit is contained in:
@@ -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 <b>'.$this->input->post('user_name').'</b> already in use!';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user