kopia lustrzana https://github.com/magicbug/Cloudlog
[User] Added missing logic to actually save date format and also measurement when creating a user
rodzic
58e69f7ef4
commit
305f8d3eb6
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue