Jump to content

ClientAreaPagePasswordReset Notification


souzadavi

Recommended Posts

Hello guys, I'm trying to use the Hook ClientAreaPagePasswordReset

SItuation: after user ask to create new password from password forgotten page at WHMCS, I would like to send the password URL link to his whatsApp. 

I didn't figure out how to use the response token from Hook ClientAreaPagePasswordReset to get the user id. 

 Any help to get it done will be nice, I just would like to know how to get the user id from response of hook ClientAreaPagePasswordReset with the token value.

thanks very much!

Link to comment
Share on other sites

2 hours ago, steven99 said:

Most if not all clientarea hooks will have userid in the vars array . 


<?php
add_hook('ClientAreaPagePasswordReset', 1, function($vars) {
    $user_id = $vars['userid']; 
    // ... continue on with code
});

 

The userid isn't available from $vars :(

 

 

Link to comment
Share on other sites

Ah, was thinking of the actual reset and just the page.   One, though kludge, would be using ClientChangePassword hook and tracking the reset via clientareapage hook and a database table.   However, quick test shows that ClientChangePassword may not actually work as it did not fire off the logModuleCall when reset or simple change. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated