Fix: Cannot remove OpenID

OpenidsettingsAction::removeOpenID() was comparing and int with a string
so always displayed "That OpenID does not belong to you."
This commit is contained in:
Chimo
2016-02-24 12:42:41 -05:00
parent 128a00c4ab
commit 99f2aba6e1
2 changed files with 11 additions and 1 deletions

View File

@@ -45,6 +45,16 @@ class User_openid extends Managed_DataObject
);
}
public function getID()
{
if (!isset($this->user_id)) {
throw new Exception('No ID set.');
} elseif (empty($this->user_id)) {
throw new Exception('Empty ID for object! (not inserted yet?).');
}
return intval($this->user_id);
}
static function hasOpenID($user_id)
{
$oid = new User_openid();