Greetings, I wrote a custom MembershipProvider for my asp.net mvc application. I get the user as follows:
public override MembershipUser GetUser(string username, bool userIsOnline)
{
using (CPersistanceManager pm = new CPersistanceManager())
{
pm.EnsureConnectionOpen();
MembershipUser membershipUser = null;
COperator oper = pm.OperatorRepository.Get(username);
membershipUser = new MembershipUser(ApplicationName,
oper.Username,
oper.ROWGUID,
oper.Email,
string.Empty,
string.Empty,
oper.IsActive,
false,
DateTime.Today,
DateTime.Today,
DateTime.Today,
DateTime.Today,
DateTime.Today
);
return membershipUser;
}
}
how can I then retrieve logged user id (rowguid) in any controller?