mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 07:42:11 +09:00
#270 비밀번호 보안수준 설정 기능 추가
This commit is contained in:
parent
5cfc8c7c4c
commit
4c2def5ea1
10 changed files with 114 additions and 4 deletions
|
|
@ -1036,6 +1036,34 @@ class memberModel extends member
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
function checkPasswordStrength($password, $stength)
|
||||
{
|
||||
if($stength == NULL)
|
||||
{
|
||||
$config = $this->getMemberConfig();
|
||||
$stength = $config->password_strength?$config->password_strength:'normal';
|
||||
}
|
||||
|
||||
$length = strlen($password);
|
||||
|
||||
switch ($stength) {
|
||||
case 'high':
|
||||
if($length < 8 || !preg_match('/[^a-zA-Z0-9]/', $password)) return false;
|
||||
/* no break */
|
||||
|
||||
case 'normal':
|
||||
if($length < 6 || !preg_match('/[a-zA-Z]/', $password) || !preg_match('/[0-9]/', $password)) return false;
|
||||
break;
|
||||
|
||||
case 'low':
|
||||
if($length < 4) return false;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function getAdminGroupSrl($site_srl = 0)
|
||||
{
|
||||
$groupSrl = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue