From 206342b49e09c042f9055185e296275cd443d5b9 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Tue, 12 May 2015 23:16:53 +0200 Subject: [PATCH] moved user_exsist_by_email out of else to prevent double emails in database --- application/libraries/Aauth.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 098a23c..da157f1 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -606,11 +606,10 @@ class Aauth { $this->error($this->CI->lang->line('aauth_error_username_exists')); $valid = FALSE; } - }else{ - if ($this->user_exsist_by_email($email)) { - $this->error($this->CI->lang->line('aauth_error_email_exists')); - $valid = FALSE; - } + } + if ($this->user_exsist_by_email($email)) { + $this->error($this->CI->lang->line('aauth_error_email_exists')); + $valid = FALSE; } if (!valid_email($email)){ $this->error($this->CI->lang->line('aauth_error_email_invalid'));