aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/uservalidationbyemail/start.php')
-rw-r--r--mod/uservalidationbyemail/start.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index 8de5d0522..ea59a2e7b 100644
--- a/mod/uservalidationbyemail/start.php
+++ b/mod/uservalidationbyemail/start.php
@@ -69,6 +69,17 @@ function uservalidationbyemail_disable_new_user($hook, $type, $value, $params) {
return;
}
+ // another plugin is requesting that registration be terminated
+ // no need for uservalidationbyemail
+ if (!$value) {
+ return $value;
+ }
+
+ // has the user already been validated?
+ if (elgg_get_user_validation_status($user->guid) == true) {
+ return $value;
+ }
+
// disable user to prevent showing up on the site
// set context so our canEdit() override works
elgg_push_context('uservalidationbyemail_new_user');