I am using a plugin to redirect after the event of receiving the "verified" badge (this badge is received when the user confirms his email - after registration). I was able to build the redirect after the email-confirmation itself, but it creates a conflict with the badge plugin. So I am trying to redirect after receiving the badge "verified".
Since the part of it was tested before, the error must be in
one of the bold parts below:
function process_event($event, $userid, $handle, $cookieid, $params) {
require_once QA_INCLUDE_DIR.'qa-app-users.php';
$logeduserid = qa_get_logged_in_userid();
if(($logeduserid==$userid)&&($event==='badge_awarded')&&($params['badge_slug']==='verified')){
$request='mypage';
$urlparams=null;
$rooturl=null;
$neaturls=null;
$anchor=null;
$url=qa_path($request, $urlparams, $rooturl, $neaturls, $anchor);
header('Location: '.$url);
qa_exit('redirect');
}
}
By the way, when this event happens, this is the line of the qa_eventlog table
"datetime|ipaddress|userid|handle|cookieid|event|params"
2015-03-08 07:14:30| |
187.59.136.226| |
18| |
estudante| |
NULL| |
badge_awarded| |
badge_slug=verified |
Finally, myPage is a previously defined page and there is no error in my error_log file.