Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I checked the Overview of all events and I don't see any event such as AfterLogin or similar.
I found another thread in this forum where somebody suggests how to proceed, but without giving any code I'm not able to reproduce the given solution.
Can somebody help?
As it seems to me that no "AfterLogin" event exists, what I think I'll do is to create a session containing the loggedin username and run a method called "userRedirect". There will be a check to see if the session is existing. If yes, do nothing (as the user already logged in and was already redirected), if not, create the session and call userRedirect as stated above.
I'd like this to work only in the backend. No idea how to proceed and I would be really happy if somebody can give me precise instructions (where to create the class, a code snippet...).
Thanks and cheers
The other thread mentions about overridding Umbraco's own membership provider with a custom one, then you can hook into various calls from there.
Quick code snippet would be...
public class CustomUsersMembershipProvider : umbraco.providers.UsersMembershipProvider
public override bool ValidateUser(string username, string password)
var success = base.ValidateUser(username, password);
// do any custom code here!
You can either drop this in your App_Code, or compile it to your own assembly.
Then replace the current Umbraco membership provider...
<add name="UsersMembershipProvider" type="Our.Umbraco.CustomUsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
Now whenever someone logs into the back-office, it would call your code.
Thanks Lee, you rock!
That's a good and helpful reply. By the way, I would put this answer/information also somewhere in the wiki, maybe related to the events. Can be helpful for other people too (ok they can find it in the forum but still, the wiki is more important on my opinion, and, if well mantained, always a good reference to all developers...)
Hei Lee, if you have time, it would be cool if you could have a look also at this question related to this thread.
Actually I thought it would be easy/peasy but as Murphy is always there, it wasn't ;)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted