Skip to content

Commit

Permalink
Merge branch '2.1/develop' of github.com:pyrocms/pyrocms into 2.1/dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
jerel committed Jul 27, 2012
2 parents 2e5b8ae + b54a428 commit 3728f26
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
8 changes: 4 additions & 4 deletions system/cms/modules/users/controllers/admin.php
Expand Up @@ -495,9 +495,9 @@ public function delete($id = 0)
*
* @return bool
*/
public function _username_check($username)
public function _username_check()
{
if ($this->ion_auth->username_check($username))
if ($this->ion_auth->username_check($this->input->post('username')))
{
$this->form_validation->set_message('_username_check', lang('user_error_username'));
return false;
Expand All @@ -514,9 +514,9 @@ public function _username_check($username)
*
* @return bool
*/
public function _email_check($email)
public function _email_check()
{
if ($this->ion_auth->email_check($email))
if ($this->ion_auth->email_check($this->input->post('email')))
{
$this->form_validation->set_message('_email_check', lang('user_error_email'));
return false;
Expand Down
4 changes: 2 additions & 2 deletions system/cms/modules/users/language/english/user_lang.php
Expand Up @@ -54,8 +54,8 @@
$lang['user_password_reset_title'] = 'Password Reset';


$lang['user_error_username'] = 'The username you selected is already in use';
$lang['user_error_email'] = 'The email address you entered is already in use';
$lang['user_error_username'] = 'The username you selected is already in use.';
$lang['user_error_email'] = 'The email address you entered is already in use.';

$lang['user_full_name'] = 'Full Name';
$lang['user_first_name'] = 'First Name';
Expand Down
26 changes: 26 additions & 0 deletions system/cms/modules/users/libraries/Ion_auth.php
Expand Up @@ -821,5 +821,31 @@ public function errors()

return $_output;
}

/** username_check
*
*
* Check to make sure username is unique upon create/edit
*
* @return void
* @author Matthew Moore / F2K Development Team
**/
public function username_check($username)
{
return $this->ci->ion_auth_model->username_check($username);
}

/** email_check
*
*
* Check to make sure email is unique upon create/edit
*
* @return void
* @author Matthew Moore / F2K Development Team
**/
public function email_check($email)
{
return $this->ci->ion_auth_model->email_check($email);
}

}

0 comments on commit 3728f26

Please sign in to comment.