diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-01 12:54:19 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-01 12:54:19 +0000 |
commit | cc7737162891a0a7712350b0ada84d29e23938c9 (patch) | |
tree | 8152d3e213113ed7a2197cca74224f402a4648cd | |
parent | 1d625e30949ca2c500ac002583485f44f576176c (diff) | |
download | elgg-cc7737162891a0a7712350b0ada84d29e23938c9.tar.gz elgg-cc7737162891a0a7712350b0ada84d29e23938c9.tar.bz2 |
Changed so that validated_email flag written as null user. Refs #190.
Also confirms fix and closes #104.
git-svn-id: https://code.elgg.org/elgg/trunk@1649 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/entities.php | 2 | ||||
-rw-r--r-- | engine/lib/users.php | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index a46b4ce54..6110b0db7 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1660,7 +1660,7 @@ if ($entity = get_entity($entity_guid)) {
$return = null;
-
+
if ($metadata->owner_guid == 0) $return = true;
if (is_null($return))
$return = can_edit_entity($entity_guid, $user_guid); diff --git a/engine/lib/users.php b/engine/lib/users.php index 8a427f0f2..fe7c67e0f 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -789,6 +789,19 @@ } /** + * Set the email validation status for a user. + * + * @param int $user_guid The user + * @param bool $status The status + */ + function set_email_validation_status($user_guid, $status) + { + $user_guid = (int)$user_guid; + + return create_metadata($user_guid, 'validated_email', $status,'', 0, 2); + } + + /** * Send out a validation request for a given user. * This function assumes that a user has already been created and that the email address has been * saved in the email field in the database. @@ -806,7 +819,7 @@ if (($user) && ($user instanceof ElggUser)) { // Clear existing status - $user->validated_email = false; + set_email_validation_status($user_guid, false); // Work out validate link $link = $CONFIG->site->url . "action/email/confirm?u=$user_guid&c=" . generate_email_validation_code($user_guid, $user->email); @@ -831,7 +844,7 @@ $valid = ($code == generate_email_validation_code($user_guid, $user->email)); if ($valid) - $user->validated_email = true; + set_email_validation_status($user_guid, true); return $valid; } |