I'm completely new to Umbraco, so the fun is just starting!
I'm trying to make a site that will eventually have some forms for booking holidays from work. These pages will be only accessible by logging on. So far I have a homepage and a tab for logging on. I have a "Secret Page" that is only accessible by logging on. That works. But there are 2 problems, firstly I don't know how to identify if a user is logged on and then when they log on they are not diverted to the secret page. The logon page just refreshes as if nothing happened. My login is done using a standard partial view macro.
I just found the documentation about working with members, you can use the .IsLoggedIn()to check if the current member is logged in It returns a boolean whether there is a Member currently logged in.
Thanks so much for your replies. I am going through the Siempre Solutions solution. It looks like close enough and simple enough too! My boss won't pay for the videos, I tried to swing that one earlier in the week. He reckons google is our friend! So myself and google found the 24days website, which I couldn't understand at all. Umbraco emailed me some free videos which I will watch today or tomorrow. It's going to be tough! A steep learning curve!
After Login
Hi All
I'm completely new to Umbraco, so the fun is just starting!
I'm trying to make a site that will eventually have some forms for booking holidays from work. These pages will be only accessible by logging on. So far I have a homepage and a tab for logging on. I have a "Secret Page" that is only accessible by logging on. That works. But there are 2 problems, firstly I don't know how to identify if a user is logged on and then when they log on they are not diverted to the secret page. The logon page just refreshes as if nothing happened. My login is done using a standard partial view macro.
Any ideas?
Thanks.
Tony
Hi Tony and welcome to our.
Maybe these two blogposts can help you further.
Using only Razor - see section 4.3 - remember to change the node ID:
http://siempresolutions.co.uk/blog/Umbraco_Members_Protected_Area_of_Website
Build your own Surface Controller:
http://siempresolutions.co.uk/blog/Umbraco_Members_Protected_Area_of_Website_Part_2_Using_MVCMembers_Controller
If you have access to the Umbraco TV, you will also then find a chapter about members. http://umbraco.tv/videos/umbraco-v7/content-editor/administrative-content/members. Since you are new to Umbraco if you donĀ“t know it yet, then you can find some videos about the basic concepts of Umbraco here: http://umbraco.tv/videos/umbraco-v7/implementor/
Some of the videos are free to watch, and some of them needs subscription to Umbraco TV
I hope so.
/Dennis
Hi Tony
I just found the documentation about working with members, you can use the .IsLoggedIn()to check if the current member is logged in It returns a boolean whether there is a Member currently logged in.
You can find the documentation here: http://our.umbraco.org/documentation/Reference/Querying/MemberShipHelper/#IsLoggedIn%28%29
Maybe this blogpost could help you too if you are using a MVC SurfaceController http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/
/Dennis
Hi Dennis
Thanks so much for your replies. I am going through the Siempre Solutions solution. It looks like close enough and simple enough too! My boss won't pay for the videos, I tried to swing that one earlier in the week. He reckons google is our friend! So myself and google found the 24days website, which I couldn't understand at all. Umbraco emailed me some free videos which I will watch today or tomorrow. It's going to be tough! A steep learning curve!
I'll be back! :)
Tony
is working on a reply...