diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index f15f5ac8..7e01c748 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -693,9 +693,10 @@ public function update_remember($user_id, $expression=null, $expire=null) { * @param string $email User's email address * @param string $pass User's password * @param string $name User's name + * @param bool $send_verification Send verification email to user * @return int|bool False if create fails or returns user id if successful */ - public function create_user($email, $pass, $name='') { + public function create_user($email, $pass, $name='', $send_verification = TRUE) { $valid = TRUE; @@ -744,15 +745,17 @@ public function create_user($email, $pass, $name='') { $this->add_member($user_id, $this->config_vars['default_group']); // if verification activated - if($this->config_vars['verification']){ - $data = null; - $data['banned'] = 1; - - $this->aauth_db->where('id', $user_id); - $this->aauth_db->update($this->config_vars['users'], $data); - - // sends verifition ( !! e-mail settings must be set) - $this->send_verification($user_id); + if($send_verification) { + if($this->config_vars['verification']){ + $data = null; + $data['banned'] = 1; + + $this->aauth_db->where('id', $user_id); + $this->aauth_db->update($this->config_vars['users'], $data); + + // sends verifition ( !! e-mail settings must be set) + $this->send_verification($user_id); + } } // Update to correct salted password