From 36cd525b50cc849167608719f157ec2981725892 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 3 Jun 2014 16:33:44 +0100 Subject: [PATCH] Added checking for unverified account on login, display appropriate error message. --- application/config/aauth.php | 1 + application/libraries/Aauth.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/application/config/aauth.php b/application/config/aauth.php index 021fafc..f4b33c8 100644 --- a/application/config/aauth.php +++ b/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', diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 2d97d5a..2721384 100644 --- a/application/libraries/Aauth.php +++ b/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 * - */ + */ \ No newline at end of file