summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-05 11:46:17 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-05 11:46:17 -0500
commit7ad3ff4a2cd494ef8c1cc293e15c0a70b8786fee (patch)
tree75d8718b5a0607dd80b5474c977508a85cf6d19a /classes
parenta97f8f6a43b27b3392ef9b03be58e37d743f394d (diff)
Allow re-authentication with OpenID
"Rememberme" logins aren't allowed to make changes to an account (since cookie-stealing is too easy). Users have to re-authenticate. Previously, it was impossible to do so without having a username and password; this change lets you do it with OpenID, too.
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index b1c061c18..a6a1b11b9 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -630,4 +630,15 @@ class User extends Memcached_DataObject
return $profile;
}
+
+ function hasOpenID()
+ {
+ $oid = new User_openid();
+
+ $oid->user_id = $this->id;
+
+ $cnt = $oid->find();
+
+ return ($cnt > 0);
+ }
}