mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
Issue 1892 Adding sha1 hash function for password of member.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10565 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4566d43b38
commit
22f700e8ac
3 changed files with 62 additions and 7 deletions
|
|
@ -721,7 +721,7 @@
|
|||
$columnList = array('member_srl', 'password');
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
|
||||
// Verify the cuttent password
|
||||
if(!$oMemberModel->isValidPassword($member_info->password, $current_password)) return new Object(-1, 'invalid_password');
|
||||
if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password');
|
||||
|
||||
// Check if a new password is as same as the previous password
|
||||
if ($current_password == $password) return new Object(-1, 'invalid_new_password');
|
||||
|
|
@ -1531,7 +1531,7 @@
|
|||
if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return new Object(-1, 'invalid_user_id');
|
||||
}
|
||||
// Password Check
|
||||
if($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password)) return new Object(-1, 'invalid_password');
|
||||
if($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password, $this->memberInfo->member_srl)) return new Object(-1, 'invalid_password');
|
||||
// If denied == 'Y', notify
|
||||
if($this->memberInfo->denied == 'Y') {
|
||||
$args->member_srl = $this->memberInfo->member_srl;
|
||||
|
|
@ -1944,7 +1944,23 @@
|
|||
$cache_key = 'object:'.$args->member_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
$args->password = md5($args->password);
|
||||
|
||||
if($args->password)
|
||||
{
|
||||
if($this->useSha1 && function_exists('sha1'))
|
||||
{
|
||||
$args->password = md5(sha1(md5($args->password)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->password = md5($args->password);
|
||||
}
|
||||
}
|
||||
else if($args->hashed_password)
|
||||
{
|
||||
$args->password = $args->hashed_password;
|
||||
}
|
||||
|
||||
return executeQuery('member.updateMemberPassword', $args);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue