diff options
author | Steve Clay <steve@mrclay.org> | 2012-11-14 20:58:39 -0500 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-11-14 20:58:39 -0500 |
commit | 7c6e3578ca8ab3e703852629e82b478265833d29 (patch) | |
tree | 60bcaf07ba3ac4ebd61f0092f73b7624c6f99d8e /mod | |
parent | de4cacceb3b9bc6b844a94494183a24a920e87e6 (diff) | |
parent | 7758aea5e6dc9cca024491cbac6de447675e4ef0 (diff) | |
download | elgg-7c6e3578ca8ab3e703852629e82b478265833d29.tar.gz elgg-7c6e3578ca8ab3e703852629e82b478265833d29.tar.bz2 |
Merge branch 'pr-426' into 1.8
Diffstat (limited to 'mod')
-rw-r--r-- | mod/uservalidationbyemail/start.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index f98f57faf..f44d2ab50 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -233,15 +233,23 @@ function uservalidationbyemail_public_pages($hook, $type, $return_value, $params * @param string $type * @param ElggUser $user * @return bool + * + * @throws LoginException */ 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); - - return $return; } |