custom operation on validating user identity
Hi
When logging, I wanna be able to look for some information after
validating the identity of the user ans save it to the Session object.
How could this be done ?
should I develop my own UC or the one in SF could be useful with some customization
thanks
Hi Bassem,
You can override LoginForm_Authenticate method of Telerik.Sitefinity.Web.UI.PublicControls.LoginControl and then check if the user is authenticated if(!e.Authenticated)
Best wishes,
Ivan Dimitrov
the Telerik team
Hi Ivan
Thank you for the response,
where can I override this LoginForm_Authenticate method of Telerik.Sitefinity.Web.UI.PublicControls.LoginControl :
I should use a UC that uses Telerik.Sitefinity.Web.UI.PublicControls.LoginControl because I cannot see it in my RadControls toolbox in VS.
thank you
Hello Bassem,
You need a custom class that inherits from Telerik.Sitefinity.Web.UI.PublicControls.LoginControl
Kind regards,
Ivan Dimitrov
the Telerik team
Can you show me an example?
Thansk, ~Pik
Here is my sample code, not sure why the Response.Redirect is not working.
void Login1_Authenticate(object sender, AuthenticateEventArgs e)
bool x;
x = UserManager.GetManager().ValidateUser("username1","userpw");
if (x.Equals(true))
Response.Redirect("~/login/select/");
I received this error message:
Server Error in '/SitefinityPortal' Application.
This type of page is not served.
Description: The type of page you have requested is
not served because it has been explicitly forbidden. Please review
the URL below and make sure that it is spelled correctly.
Requested URL: /SitefinityPortal/login/select/
Thanks,~Pik
Hello,
The page /SitefinityPortal/login/select/ does not exist - this is not the correct url or the user you use does not have view permissions.
Kind regards,
Ivan Dimitrov
the Telerik team
Thanks for the reply.
The page does exists. It is working fine if I used the sitefinity login control but not my custom login control. Any idea why?
Thanks,
Pik
Hi Pik,
Since this page does not exist the problem is in your code and the way that you construct the url. I do not know what the the proper url for your specific SiteMap structure.
Regards,
Ivan Dimitrov
the Telerik team