From 2aa0e3846b60a44c6f2dbfe2f9a690776533dca3 Mon Sep 17 00:00:00 2001 From: hypeJunction Date: Mon, 12 Dec 2011 23:31:26 +0100 Subject: Fixed #4198 uservalidationbyemail respects the return value of the register,user hook --- mod/uservalidationbyemail/start.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/uservalidationbyemail/start.php') diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index 8de5d0522..576e12247 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -69,6 +69,12 @@ 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; + } + // disable user to prevent showing up on the site // set context so our canEdit() override works elgg_push_context('uservalidationbyemail_new_user'); -- cgit v1.2.3 From 53e6eb8ad8c71ed04e33b32024e3e2ea4e6e2c18 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 17 Dec 2011 08:11:36 -0500 Subject: Fixes #4217 user validation by email now respects decisions by other plugins --- mod/uservalidationbyemail/start.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/uservalidationbyemail/start.php') diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index 576e12247..ea59a2e7b 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -75,6 +75,11 @@ function uservalidationbyemail_disable_new_user($hook, $type, $value, $params) { 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'); -- cgit v1.2.3