Uservalidationbyemail function?


I want to modify the code of function

function uservalidationbyemail_after_registration_url($hook, $type, $value, $params)

in uservalidationbyemail 1.9 plugin, to find the guid of the user that is registering too, not only the $url using elgg_extract('current_url', $params), but elgg_extract('user', $params) function does not work, I think it is because this function is registered as a forward system hook handler. How can I manage this ?

  • Try handeling the hook of  user registration like this, if you just want to do something.

    function my_register_handler($hook, $type, $returnvalue, $params) {

    $user = $params['user'];

    $_SESSION['reg_user'] =$user;


    From here you can also put in session and then check the session from  uservalidationbyemail_after_registration_url or just impliment your own handler for 


    elgg_register_plugin_hook_handler('forward', 'system', 'my_after_registration_url');



    function my_after_registration_url($hook, $type, $value, $params) {

        $user= $_SESSION['reg_user'] 

        if ($url == elgg_get_site_url() . 'action/register') {

            $session = elgg_get_session();

            $email = $session->get('emailsent', '');

            if ($email) {

                return elgg_get_site_url() . 'uservalidationbyemail/emailsent';