K
kpg*
Hi all,
asp.net 2.0
I'm using the login control with no frills to authenticate
users.
I want to add a value to the user's profile when the user
successfully logs in, but I want to do this only once,
and I want to do it each time the user logs in (because
it may change over time).
The login control has a 'LoggedIn' event, but the user is
not flagged as authenticated at this point and the user's
profile does not yet exist.
It seems the earliest that the profile does exist is on the
page that is loaded after the user logs in, but this page can
be loaded many times by authenticated users that are not
necessarily coming from the login page.
I'm looking for an event on the login page that lets know
that the user successfully loggedin (I'm assuming that's
the loggedin event) AND allows access to the user's profile.
I can think of other several ways to get this done but none
are as clean.
I could set a session variable indicating I am coming from the
login page and inspect this each time the login destination page
is loaded.
I could set a default profile value that indicates if has not
been set and only set it in that case (but there is a problem
with this method - the value will change over time so I would
have to clear it when the user logs out - an event I won't
always know about)
I could use the loggedIn event handler and load the profile myself.
So far this is the most attractive solution since it keeps the
login code all in one place.
I'm just a little surprised that the user object has not been
initialized properly in the loggedin event of the login control
kpg
asp.net 2.0
I'm using the login control with no frills to authenticate
users.
I want to add a value to the user's profile when the user
successfully logs in, but I want to do this only once,
and I want to do it each time the user logs in (because
it may change over time).
The login control has a 'LoggedIn' event, but the user is
not flagged as authenticated at this point and the user's
profile does not yet exist.
It seems the earliest that the profile does exist is on the
page that is loaded after the user logs in, but this page can
be loaded many times by authenticated users that are not
necessarily coming from the login page.
I'm looking for an event on the login page that lets know
that the user successfully loggedin (I'm assuming that's
the loggedin event) AND allows access to the user's profile.
I can think of other several ways to get this done but none
are as clean.
I could set a session variable indicating I am coming from the
login page and inspect this each time the login destination page
is loaded.
I could set a default profile value that indicates if has not
been set and only set it in that case (but there is a problem
with this method - the value will change over time so I would
have to clear it when the user logs out - an event I won't
always know about)
I could use the loggedIn event handler and load the profile myself.
So far this is the most attractive solution since it keeps the
login code all in one place.
I'm just a little surprised that the user object has not been
initialized properly in the loggedin event of the login control
kpg