summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php11
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;