支持系统手机号登录系统

Signed-off-by: 小胡 <3203164629@qq.com>
This commit is contained in:
小胡
2024-03-04 09:37:27 +00:00
committed by Gitee
Unverified
parent 4772264632
commit dfa31fd1a1
3 changed files with 11 additions and 2 deletions

View File

@@ -628,6 +628,11 @@ function isemail($email)
return strlen($email) > 6 && strlen($email) <= 32 && preg_match("/^([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-]+[.][A-Za-z0-9\-.]+)$/", $email);
}
function isphone($phone)
{
return preg_match("/^1[3456789]\d{9,10}$/", $phone);
}
function quescrypt($questionid, $answer)
{
return $questionid > 0 && $answer != '' ? substr(md5($answer . md5($questionid)), 16, 8) : '';