Browse Source

Merge pull request #3 from killfall/verification_error

Added checking for unverified account on login, display appropriate error message.
develop
Emre Akay 11 years ago
parent
commit
8975e71021
  1. 1
      application/config/aauth.php
  2. 11
      application/libraries/Aauth.php

1
application/config/aauth.php

@ -80,6 +80,7 @@ $config['aauth'] = array(
'wrong' => 'E-mail or Password is wrong.',
'exceeded' => 'Login try limit exceeded.',
'no_user' => 'User not Exist',
'not_verified' => 'Please verify your account.',
'group_exist' => 'Group already exists',
'self_pm' => 'It is not reasonable to send pm to yourself :)',
'no_pm' => 'Pm not found',

11
application/libraries/Aauth.php

@ -71,6 +71,17 @@ class Aauth {
}
}
$query = null;
$query = $this->CI->db->where('email', $email);
$query = $this->CI->db->where('banned', 1);
$query = $this->CI->db->where('verification_code !=', '');
$query = $this->CI->db->get($this->config_vars['users']);
if ($query->num_rows() > 0) {
$this->error($this->config_vars['not_verified']);
return false;
}
$query = null;
$query = $this->CI->db->where('email', $email);

Loading…
Cancel
Save