Opened 14 months ago
Resolver that uses username as email address
|Reported by:||warnes||Owned by:||hasienda|
This simple patch adds an additional resolver for the case when the username is the user's email address:
Index: announcer/resolvers.py =================================================================== --- announcer/resolvers.py (revision 13781) +++ announcer/resolvers.py (working copy) @@ -102,3 +102,10 @@ specified = self.setting.get_user_setting(req.session.sid) or '' data = dict(specified_xmpp = specified,) return "prefs_announcer_xmppaddress.html", data + +class UsernameEmailResolver(Component): + """ This resolver uses the username as the email address """ + implements(IAnnouncementAddressResolver) + + def get_address_for_name(self, name, authenticated): + return name
Change History (0)
Note: See TracTickets for help on using tickets.