From bug 625001 > Comment on attachment 503127 [details] [diff] [review] > Make sure the password_reset API is public > > + user_name = request.sync_info['username'] > + user_id = self.auth.get_user_id(user_name) > + user_name, user_email = self.auth.get_user_info(user_id) > > This trio is a little weirdly loopy, though I understand why. Perhaps we should > just add a get_user_email into auth. > This is not optimal for sure. Another solution would be to add an optional "fields" argument to get_user_info() ala ldapsearch, to filter out the fields we want to get back: user_email = self.auth.get_user_info(user_id, fields=['email']) This can be useful as long as we're able to define a generic list of fields for the user, every backend can translate to its own internal representation.
This would work. For now, I'd just leave it until we have more idea what else might get packed in. The code there works (though I might go with __, user_email to raise fewer eyebrows)
(In reply to comment #1) > This would work. For now, I'd just leave it until we have more idea what else > might get packed in. The code there works Sure. > (though I might go with __, user_email to raise fewer eyebrows) Yeah that's what I ended up doing for clarity