diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 0fedf52..fb158f7 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -695,7 +695,7 @@ class Aauth { * @param string $name User's name * @return int|bool False if create fails or returns user id if successful */ - public function create_user($email, $pass, $name = 'default') { + public function create_user($email, $pass, $name = FALSE) { $valid = TRUE; @@ -705,7 +705,7 @@ class Aauth { $valid = FALSE; } } - if ($this->user_exist_by_name($name) && $name != 'default') { + if ($this->user_exist_by_name($name) && $name != FALSE) { $this->error($this->CI->lang->line('aauth_error_username_exists')); $valid = FALSE; } @@ -723,7 +723,7 @@ class Aauth { $this->error($this->CI->lang->line('aauth_error_password_invalid')); $valid = FALSE; } - if ($name !='' && !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){ + if ($name != FALSE && !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){ $this->error($this->CI->lang->line('aauth_error_username_invalid')); $valid = FALSE; } @@ -734,7 +734,7 @@ class Aauth { $data = array( 'email' => $email, 'pass' => $this->hash_password($pass, 0), // Password cannot be blank but user_id required for salt, setting bad password for now - 'name' => ($name === 'default') ? '' : $name , + 'name' => (!$name) ? '' : $name , ); if ( $this->aauth_db->insert($this->config_vars['users'], $data )){