Title: Password Reset Hook Not Working
Last modified: August 21, 2016

---

# Password Reset Hook Not Working

 *  [guldanja](https://wordpress.org/support/users/guldanja/)
 * (@guldanja)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/password-reset-hook-not-working/)
 * 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)

 *  [mppatil211](https://wordpress.org/support/users/mppatil211/)
 * (@mppatil211)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/password-reset-hook-not-working/#post-4053510)
 * try this:
    `add_action('password_reset', 'my_password_reset', 10,2);`

Viewing 1 replies (of 1 total)

The topic ‘Password Reset Hook Not Working’ is closed to new replies.

## Tags

 * [password reset](https://wordpress.org/support/topic-tag/password-reset/)

 * 1 reply
 * 2 participants
 * Last reply from: [mppatil211](https://wordpress.org/support/users/mppatil211/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/password-reset-hook-not-working/#post-4053510)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
