mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
on failed auth due to unverified email, tell the person why and remind them to check their email.
This commit is contained in:
parent
769da564e2
commit
1a7ccc462b
1 changed files with 5 additions and 2 deletions
|
@ -83,7 +83,7 @@ function account_verify_password($login, $pass) {
|
|||
|
||||
if(($email_verify) && ($register_policy == REGISTER_OPEN) && ($account['account_flags'] & ACCOUNT_UNVERIFIED)) {
|
||||
logger('email verification required for ' . $login);
|
||||
return null;
|
||||
return ( [ 'reason' => 'unvalidated' ] );
|
||||
}
|
||||
|
||||
if(($account['account_flags'] == ACCOUNT_OK)
|
||||
|
@ -259,7 +259,10 @@ else {
|
|||
}
|
||||
else {
|
||||
$verify = account_verify_password($_POST['username'], $_POST['password']);
|
||||
if($verify) {
|
||||
if($verify && array_key_exists('reason',$verify) && $verify['reason'] === 'unvalidated') {
|
||||
notice( t('Email validation is incomplete. Please check your email.'));
|
||||
}
|
||||
elseif($verify) {
|
||||
$atoken = $verify['xchan'];
|
||||
$channel = $verify['channel'];
|
||||
$account = App::$account = $verify['account'];
|
||||
|
|
Loading…
Reference in a new issue