I'm having trouble figuring out the best way to get a user's login/username inside a SurfaceController. Members.GetByEmail(model.Email) returns an IPublishedContent object that I can cast to Member (a generated model) but neither have the username on them.
Retrieve a member's login by their email address
I'm having trouble figuring out the best way to get a user's login/username inside a
SurfaceController
.Members.GetByEmail(model.Email)
returns anIPublishedContent
object that I can cast toMember
(a generated model) but neither have the username on them.Can anyone point me in the right direction?
You could do
But I think this goes to the Database, so It could get you in trouble performancewise
If you want the username for the currentLoggedInMember you could do:
So it's important to know what you want to accomplish
Frans
is working on a reply...