\r
if openid:\r
if google_accounts_lookup.search(openid):\r
- return UnknownGoogleUser()\r
+ return UnknownGoogleUser(sxu.get('id'))\r
if yahoo_accounts_lookup.search(openid):\r
- return UnknownYahooUser()\r
+ return UnknownYahooUser(sxu.get('id'))\r
\r
for lookup in openid_lookups:\r
if lookup.search(openid):\r
return lookup.search(openid).group('uname')\r
\r
- return UnknownUser()\r
+ return UnknownUser(sxu.get('id'))\r
\r
class UnknownUser(object):\r
- counter = 0\r
- def __init__(self):\r
- self.__class__.counter += 1\r
- self.number = self.__class__.counter\r
+ def __init__(self, id):\r
+ self._id = id\r
\r
def __str__(self):\r
- return _("Unknown user %(number)d") % {'number': self.number}\r
+ return _("user-%(id)d") % {'id': self._id}\r
\r
def __unicode__(self):\r
return self.__str__()\r
return self.__str__()\r
\r
class UnknownGoogleUser(UnknownUser):\r
- counter = 0\r
-\r
def __str__(self):\r
- return _("Unknown google user %(number)d") % {'number': self.number}\r
+ return _("user-%(id)d (google)") % {'id': self._id}\r
\r
class UnknownYahooUser(UnknownUser):\r
- counter = 0\r
-\r
def __str__(self):\r
- return _("Unknown yahoo user %(number)d") % {'number': self.number}\r
+ return _("user-%(id)d (yahoo)") % {'id': self._id}\r
\r
\r
class IdMapper(dict):\r