Is it possible to get the id of a protected page in the member login page? I need it to pass to the controller to redirect to protected page after successful login.
Sorry for replying late, I've to work on an urgent project.
I'm using the following code to check if a member is approved prior to login, then redirect to protected page if login succeeded. Login form works fine if the email and pass entered correctly. If the user makes typo in email or pass and tries with correct entries in second try i get the error:
[NullReferenceException: There is no current PublishedRequest, it must be initialized before the RenderRouteHandler executes]
How to get the node id of a protected page
Hi all,
Is it possible to get the id of a protected page in the member login page? I need it to pass to the controller to redirect to protected page after successful login.
Thanks...
Hi Osman
You can get the node id as usual page, protected pages mean that members are not able to visit the page if their access is restricted.
Thanks,
Alex
Hi Alex,
Sorry for replying late, I've to work on an urgent project.
I'm using the following code to check if a member is approved prior to login, then redirect to protected page if login succeeded. Login form works fine if the email and pass entered correctly. If the user makes typo in email or pass and tries with correct entries in second try i get the error:
[NullReferenceException: There is no current PublishedRequest, it must be initialized before the RenderRouteHandler executes]
Here is the code i use in MVC login controller:
If i use return RedirectToUmbracoPage(Id) for after succesfull login it works, that's why i need to pass the id of protected page to login view.
Best regards, Osman
is working on a reply...