diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-01 10:30:45 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-01 10:30:45 -0800 |
commit | c14ac57b1935a124dd4205e0f02d939086b5867e (patch) | |
tree | 207e1c947eec0eadac98ba0050d84056e450d99e /classes | |
parent | 85544d369d2c9c3ba0fef6c821c951879823b014 (diff) | |
parent | fba4153346435026976193a7d38e6042b863733d (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/classes/User.php b/classes/User.php index 022044aac..0ab816b57 100644 --- a/classes/User.php +++ b/classes/User.php @@ -250,10 +250,6 @@ class User extends Memcached_DataObject $user->nickname = $nickname; - if (!empty($password)) { // may not have a password for OpenID users - $user->password = common_munge_password($password, $id); - } - // Users who respond to invite email have proven their ownership of that address if (!empty($code)) { @@ -286,6 +282,9 @@ class User extends Memcached_DataObject $user->id = $id; $user->uri = common_user_uri($user); + if (!empty($password)) { // may not have a password for OpenID users + $user->password = common_munge_password($password, $id); + } $result = $user->insert(); @@ -945,9 +944,9 @@ class User extends Memcached_DataObject $pr->orderBy('created'); - $pr->limit(0, 1); + $pr->limit(1); - if ($pr->fetch($true)) { + if ($pr->find(true)) { $owner = User::staticGet('id', $pr->profile_id); } else { $owner = null; |