• Hi so I am trying to update the password in my CRM when a user updates their password. Howerver the following function doesnt work and it is not outputting anything for the variable.

    add_action( 'password_reset', 'my_password_reset' );
    
        function my_password_reset( $user, $new_pass ) {
        //PROBLEM I AM HAVING IS NOT BEING ABLE TO HAVE ACCESS TO NEW PASSWORD!
            // Do something before password reset.
            print_r($new_pass);
            $app = new iSDK;
    	// connection
    	if ($app->cfgCon("connectionName")) {
    		$returnFields = array('Id', 'Username', 'Password');
    		$result = $app->findByEmail($user->user_login, $returnFields);
    		if(substr($result, 0, 4)!='ERRO') {
    			$returnFields = array('Password'=>$new_pass);
    			$conID = $app->updateCon($result[0][Id], $returnFields);
    	}
        }
        }


    [Please use the code buttons when posting code on these forums]

    Does anyone have any suggestions?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Password Reset Hook Not Working’ is closed to new replies.