aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-03 15:07:33 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-03 15:07:33 +0000
commit5bb5a1806ee916ee8e299ea11f67e5e9e74abda6 (patch)
tree3337a01e4c502419769e4ffbdd9f3782d28a7bde
parent49bdf4815e81d37d2d557e78fb959e1d9fd98839 (diff)
downloadelgg-5bb5a1806ee916ee8e299ea11f67e5e9e74abda6.tar.gz
elgg-5bb5a1806ee916ee8e299ea11f67e5e9e74abda6.tar.bz2
Closes #550: Code metadata now moved to private storage
git-svn-id: https://code.elgg.org/elgg/trunk@2498 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/users.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index cdc74995b..8c1b9253f 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -837,7 +837,8 @@
{
// generate code
$code = generate_random_cleartext_password();
- create_metadata($user_guid, 'conf_code', $code,'', 0, 0);
+ //create_metadata($user_guid, 'conf_code', $code,'', 0, 0);
+ set_private_setting($user_guid, 'passwd_conf_code', $code);
// generate link
$link = $CONFIG->site->url . "action/user/passwordreset?u=$user_guid&c=$code";
@@ -892,13 +893,14 @@
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
- if (($user) && ($user->conf_code == $conf_code))
+ if (($user) && (get_private_setting($user_guid, 'passwd_conf_code') == $conf_code))
{
$password = generate_random_cleartext_password();
if (force_user_password_reset($user_guid, $password))
{
- remove_metadata($user_guid, 'conf_code');
+ //remove_metadata($user_guid, 'conf_code');
+ remove_private_setting($user_guid, 'passwd_conf_code');
$email = sprintf(elgg_echo('email:resetpassword:body'), $user->name, $password);