Hello group,
i'm trying to load some additionally stored information to a user at
login time.
That data is self created and stored in an sql database.
I hooked in the login control definiton with : OnLoggedIn="loadMyUserData"
The following code should show what i'm trying to do (i removed the part
of working with this data) :
public void loadMyUserData(object sender, EventArgs e)
{
ContactDetailsService.getInstance().getContactDeta ilsForUser(Membership.GetUser());
}
I get a null reference exception, so MemberShip.GetUser() does not know
about the currently logged in user at this time.
My question is, where can i hook to access the currently logged in user
during this login process and before the user is automatically
redirected to the specified page? I know that i could read the username
from the login form, get the MemberShipUser for that username and pass
this, but it seems not nice.
Any ideas?
Thanks in advance
Florian