aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/lib/functions.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 02:12:20 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 02:12:20 +0000
commit6f59a0482ed182ed3f544ebde84bbcfdcd9b4680 (patch)
treecd5e07ce01084ade525dae1b168225638e28ac59 /mod/uservalidationbyemail/lib/functions.php
parent68f09537fcdb4222947a6c8938e4416bcc47e4ec (diff)
downloadelgg-6f59a0482ed182ed3f544ebde84bbcfdcd9b4680.tar.gz
elgg-6f59a0482ed182ed3f544ebde84bbcfdcd9b4680.tar.bz2
Refs #2428 removed some global CONFIG usage in plugins
git-svn-id: http://code.elgg.org/elgg/trunk@7479 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/uservalidationbyemail/lib/functions.php')
-rw-r--r--mod/uservalidationbyemail/lib/functions.php9
1 files changed, 6 insertions, 3 deletions
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