aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-19 11:45:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-19 11:45:38 +0000
commit961e31c8833220e85b5c73651576642101a94b15 (patch)
treeafdfeedf3c2daece0d20fd7e78c71a88bc2bd1a6 /mod/uservalidationbyemail/lib
parent4dc9076224a0d93f0dc078124aa9fb94a669f16c (diff)
downloadelgg-961e31c8833220e85b5c73651576642101a94b15.tar.gz
elgg-961e31c8833220e85b5c73651576642101a94b15.tar.bz2
Closes #617 core has get and set functions for user validation status
git-svn-id: http://code.elgg.org/elgg/trunk@7344 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/uservalidationbyemail/lib')
-rw-r--r--mod/uservalidationbyemail/lib/functions.php37
1 files changed, 1 insertions, 36 deletions
diff --git a/mod/uservalidationbyemail/lib/functions.php b/mod/uservalidationbyemail/lib/functions.php
index ea77c8d61..aadabc927 100644
--- a/mod/uservalidationbyemail/lib/functions.php
+++ b/mod/uservalidationbyemail/lib/functions.php
@@ -65,43 +65,8 @@ function uservalidationbyemail_validate_email($user_guid, $code) {
$user = get_entity($user_guid);
if ($code == uservalidationbyemail_generate_code($user_guid, $user->email)) {
- return uservalidationbyemail_set_user_validation_status($user_guid, true, 'email');
+ return elgg_set_user_validation_status($user_guid, true, 'email');
}
return false;
}
-
-/**
- * Set the validation status for a user.
- *
- * @param int $user_guid The user's GUID
- * @param bool $status Validated (true) or false
- * @param string $method Optional method to say how a user was validated
- * @return bool
- */
-function uservalidationbyemail_set_user_validation_status($user_guid, $status, $method = '') {
-
- $result1 = create_metadata($user_guid, 'validated', $status, '', 0, ACCESS_PUBLIC, false);
- $result2 = create_metadata($user_guid, 'validated_method', $method, '', 0, ACCESS_PUBLIC, false);
- if ($result1 && $result2) {
- return true;
- } else {
- return false;
- }
-}
-
-/**
- * Returns the validation status of a user.
- *
- * @param int $user_guid The user's GUID
- * @return bool
- */
-function uservalidationbyemail_get_user_validation_status($user_guid) {
- $md = get_metadata_byname($user_guid, 'validated');
-
- if ($md && $md->value) {
- return TRUE;
- }
-
- return FALSE;
-}