mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 01:03:28 +09:00
#270 비밀번호 보안수준 설정 기능 추가
This commit is contained in:
parent
b3dfb1a051
commit
981f04d14f
4 changed files with 59 additions and 24 deletions
|
|
@ -1050,17 +1050,20 @@ class memberModel extends member
|
|||
}
|
||||
|
||||
|
||||
function checkPasswordStrength($password, $stength)
|
||||
function checkPasswordStrength($password, $strength)
|
||||
{
|
||||
if($stength == NULL)
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
|
||||
if($strength == NULL)
|
||||
{
|
||||
$config = $this->getMemberConfig();
|
||||
$stength = $config->password_strength?$config->password_strength:'normal';
|
||||
$strength = $config->password_strength?$config->password_strength:'normal';
|
||||
}
|
||||
|
||||
$length = strlen($password);
|
||||
|
||||
switch ($stength) {
|
||||
switch ($strength) {
|
||||
case 'high':
|
||||
if($length < 8 || !preg_match('/[^a-zA-Z0-9]/', $password)) return false;
|
||||
/* no break */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue