From 6f59a0482ed182ed3f544ebde84bbcfdcd9b4680 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 30 Nov 2010 02:12:20 +0000 Subject: Refs #2428 removed some global CONFIG usage in plugins git-svn-id: http://code.elgg.org/elgg/trunk@7479 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/uservalidationbyemail/lib/functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mod/uservalidationbyemail/lib/functions.php') diff --git a/mod/uservalidationbyemail/lib/functions.php b/mod/uservalidationbyemail/lib/functions.php index aadabc927..ab382c059 100644 --- a/mod/uservalidationbyemail/lib/functions.php +++ b/mod/uservalidationbyemail/lib/functions.php @@ -14,10 +14,11 @@ * @return string */ function uservalidationbyemail_generate_code($user_guid, $email_address) { - global $CONFIG; + + $site_url = elgg_get_site_url(); // Note I bind to site URL, this is important on multisite! - return md5($user_guid . $email_address . $CONFIG->site->url . get_site_secret()); + return md5($user_guid . $email_address . $site_url . get_site_secret()); } /** @@ -30,13 +31,15 @@ function uservalidationbyemail_generate_code($user_guid, $email_address) { function uservalidationbyemail_request_validation($user_guid) { global $CONFIG; + $site_url = elgg_get_site_url(); + $user_guid = (int)$user_guid; $user = get_entity($user_guid); if (($user) && ($user instanceof ElggUser)) { // Work out validate link $code = uservalidationbyemail_generate_code($user_guid, $user->email); - $link = "{$CONFIG->site->url}pg/uservalidationbyemail/confirm?u=$user_guid&c=$code"; + $link = "{$site_url}pg/uservalidationbyemail/confirm?u=$user_guid&c=$code"; $site = $CONFIG->site; // Send validation email -- cgit v1.2.3