ExpressionEngine Ajax Member Validation

We needed to handle some custom Javascript functionality on an ExpressionEngine website and required to log members in via an AJAX call. Turns out it was actually really simple to extend the built in Member_auth class to achieve this.

I may end up putting this functionality into an add-on for others to use when I find the time. Here's a demo:

This uses the built in {exp:member:login_form} with a Jquery form handler that hijacks the post submission and sends the POST'ed data to a custom URL instead. This URL triggers a server side handler which is essentially just a modified version of Member_auth->member_login() that returns errors in JSON format instead of ->output->show_user_error().

 



Comments

blog comments powered by Disqus