diff options
author | Jerome Bakker <jeabakker@coldtrick.com> | 2012-11-08 10:57:45 +0100 |
---|---|---|
committer | Jerome Bakker <jeabakker@coldtrick.com> | 2012-11-08 10:57:45 +0100 |
commit | cb8231ad16a9fbd9e4b5df9af8b8d79f563a2bbb (patch) | |
tree | 5c62bc0356720999bac2a91568681fcbe5e6ef4f /mod | |
parent | b2232139f13b759e8f5ce62def75eaeaa530a5b6 (diff) | |
download | elgg-cb8231ad16a9fbd9e4b5df9af8b8d79f563a2bbb.tar.gz elgg-cb8231ad16a9fbd9e4b5df9af8b8d79f563a2bbb.tar.bz2 |
fixes missing error message on manual login of an unvalidated user
Diffstat (limited to 'mod')
-rw-r--r-- | mod/uservalidationbyemail/start.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index f98f57faf..a453f36a4 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -238,8 +238,16 @@ function uservalidationbyemail_check_manual_login($event, $type, $user) { $access_status = access_get_show_hidden_status(); access_show_hidden_entities(TRUE); - // @todo register_error()? - $return = ($user instanceof ElggUser && !$user->isEnabled() && !$user->validated) ? FALSE : NULL; + if(($user instanceof ElggUser) && !$user->isEnabled() && !$user->validated){ + // send new validation email + uservalidationbyemail_request_validation($user->getGUID()); + + // restore hidden entities settings + access_show_hidden_entities($access_status); + + // throw error so we get a nice error message + throw new LoginException(elgg_echo('uservalidationbyemail:login:fail')); + } access_show_hidden_entities($access_status); |