-
- 32 Posts
I am creating an Ajax login form using jquery. What I need is for the Login snippet to return a message of OK if login was a success. If there are errors logging in I need Login snippet to return the errors. I searched all through the snippet as well as the files in core/components/login and could not figure it out. Can anyone help me or point me in the right direction?
-
- 32 Posts
Thanks for the response Anso but I am still at a loss for what to do. The Login snippet is pretty complex. I have a login form that works fine with the snippet. However I want to turn it into an ajax form. To do this I need something along the lines of the following for login snippet.
If login successful then return "OK"
If login failed then return "Error:"
This way I can take what the snippet returns in my Ajax call and say something like
If msg = "OK" then .... refresh page
If msg != "OK" then display msg
The only problem I am having right now is that it seems that the Login snippet returns the link to a webpage. I want to be able to return what I want but I cannot figure it out because of the complexity of the Login snippet. Can someone point me in the right direction or give me an example? I have read the Login documentation in the WIKI and still cannot figure out what I need to do.