diff --git a/application/helpers/recaptchalib_helper.php b/application/helpers/recaptchalib_helper.php index 7322ad9..35d19c7 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 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); }