OpenidsettingsAction::removeOpenID() was comparing and int with a string
so always displayed "That OpenID does not belong to you."
// TRANS: Form validation error for a non-existing OpenID.
throw new ClientException(_m('No such OpenID.'));
}
- if ($this->scoped->getID() !== $oid->user_id) {
+ if ($this->scoped->getID() !== $oid->getID()) {
// TRANS: Form validation error if OpenID is connected to another user.
throw new ClientException(_m('That OpenID does not belong to you.'));
}
);
}
+ 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();