From 586e9316a6f7a9378c7eac3eda1ef3309613ecd1 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Thu, 3 Mar 2016 11:57:54 +0100 Subject: [PATCH 1/3] PHP7 fix #107 --- application/helpers/recaptchalib_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/helpers/recaptchalib_helper.php b/application/helpers/recaptchalib_helper.php index 7322ad9..df19dd5 100644 --- a/application/helpers/recaptchalib_helper.php +++ b/application/helpers/recaptchalib_helper.php @@ -52,7 +52,7 @@ class ReCaptcha * * @param string $secret shared secret between site and ReCAPTCHA server. */ - function ReCaptcha($secret) + public function __construct($secret) { if ($secret == null || $secret == "") { die("To use reCAPTCHA you must get an API key from Date: Sun, 6 Mar 2016 09:35:33 +0100 Subject: [PATCH 3/3] added a check if user has email or name already fix for #109 --- application/libraries/Aauth.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index fb158f7..7dde4f2 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -783,7 +783,12 @@ class Aauth { $data = array(); $valid = TRUE; + $user = $this->get_user($user_id); + if ($user->email == $email) { + $email = FALSE; + } + if ($email != FALSE) { if ($this->user_exist_by_email($email)) { $this->error($this->CI->lang->line('aauth_error_update_email_exists')); @@ -805,6 +810,10 @@ class Aauth { $data['pass'] = $this->hash_password($pass, $user_id); } + if ($user->name == $name) { + $name = FALSE; + } + if ($name != FALSE) { if ($this->user_exist_by_name($name)) { $this->error($this->CI->lang->line('aauth_error_update_username_exists')); @@ -817,10 +826,10 @@ class Aauth { $data['name'] = $name; } - if (!$valid) { + if ( !$valid || empty($data)) { return FALSE; } - + $this->aauth_db->where('id', $user_id); return $this->aauth_db->update($this->config_vars['users'], $data); }