Browse Source

Added checking for unverified account on login, display appropriate error message.

develop
Jacob Tomlinson 11 years ago
parent
commit
36cd525b50
  1. 1
      application/config/aauth.php
  2. 13
      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',

13
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);
@ -1084,4 +1095,4 @@ class Aauth {
* tamam ama engelleme ve limit olayı koymadım. // pm için okundu ve göster, sil, engelle? die fonksiyonlar eklencek , gönderilen pmler, alınan pmler, arasındaki pmler,
* tamm// already existedleri info yap onlar error değil hacım
*
*/
*/
Loading…
Cancel
Save