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
Hi all
After retrieving a member using Members.GetById(), is it possible to set this as the current logged in member?
Thanks in advance
Hi Ryuu,
you can use this:
MembershipHelper Members = new MembershipHelper(UmbracoContext.Current);if(Members.Login(username, password)){ // success: do anything}
Best,
Sören
Hi Sören
Thanks for the quick reply, but I don't have the member password at this point (it doesn't appear to be available on Member object I just retrieved)
I'm trying to set the retrieved member as the currently logged in one
HI Ryuu,
Check this https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/63960-Create-member-then-login-programmatically , is that what you want to do ?
Thanks,
Ale
Ale you legend! Exactly what I was looking for, thank you. :)
Surprised I never came across that thread as I spent quite a bit of time furiously googling. Ah well
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Log a member in programmatically
Hi all
After retrieving a member using Members.GetById(), is it possible to set this as the current logged in member?
Thanks in advance
Hi Ryuu,
you can use this:
Best,
Sören
Hi Sören
Thanks for the quick reply, but I don't have the member password at this point (it doesn't appear to be available on Member object I just retrieved)
I'm trying to set the retrieved member as the currently logged in one
HI Ryuu,
Check this https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/63960-Create-member-then-login-programmatically , is that what you want to do ?
Thanks,
Ale
Ale you legend! Exactly what I was looking for, thank you. :)
Surprised I never came across that thread as I spent quite a bit of time furiously googling. Ah well
is working on a reply...