diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-10 19:45:11 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-10 19:45:11 -0700 |
commit | 1a7ccc462b8aeea7704562b8d14d31e3bcb41622 (patch) | |
tree | b3c623e5c43b31415005b93ccebb1b42301ef5ea | |
parent | 769da564e296d9589522b9578f8974fcc7c385c5 (diff) | |
download | volse-hubzilla-1a7ccc462b8aeea7704562b8d14d31e3bcb41622.tar.gz volse-hubzilla-1a7ccc462b8aeea7704562b8d14d31e3bcb41622.tar.bz2 volse-hubzilla-1a7ccc462b8aeea7704562b8d14d31e3bcb41622.zip |
on failed auth due to unverified email, tell the person why and remind them to check their email.
-rw-r--r-- | include/auth.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/auth.php b/include/auth.php index c7be69583..78be32bf4 100644 --- a/include/auth.php +++ b/include/auth.php @@ -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']; |