AJAX user registration and JSON returned I am using business logic plugin to tap into save user event and create some profile field values.

public function init(){
    parent::init();

    craft()-&gt;on('users.saveUser', function(Event $event) {

    }
}


On save user returns a success object.
I want to return more user profile data to the page on success.

In the save User function I have tried:

 if (craft()-&gt;request-&gt;isAjaxRequest())
 {
     $return = array(
         'success' =&gt; true,
         'errorCode' =&gt; 1,
         'uid' =&gt; $user-&gt;id,
         'urn' =&gt; $URN
     );

     return json_encode($return);
 }


but I still get the usual response of success and user id.
How do i get a thank you 'page' into the process so I can feedback to the user?
Instead of listening to the onSaveUser event, I'd update my user save form on the front-end to point to a controller's action in my plugin.

You can run similar logic to what Craft's UsersController-&gt;actionSaveUser() is doing and return any custom JSON encoded data you want back to your template.