I am using business logic plugin to tap into save user event and create some profile field values.
public function init(){
parent::init();
craft()->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()->request->isAjaxRequest())
{
$return = array(
'success' => true,
'errorCode' => 1,
'uid' => $user->id,
'urn' => $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?