* change for compute password strength.

This commit is contained in:
wangyidong
2015-11-06 14:30:55 +08:00
parent 5f70edfbfd
commit e2c77e381c
11 changed files with 58 additions and 63 deletions
+6
View File
@@ -50,6 +50,12 @@ class ssoModel extends model
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->account)->fetch();
if($user) die(js::alert($this->lang->sso->bindHasAccount));
if(isset($this->config->safe->mode) and $this->user->computePasswordStrength($data->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
$user = new stdclass();
$user->account = $data->account;
$user->password = md5($data->password1);