• Hi

    Could you please add to the next update use of profile_update action – it is required for the scenario of when the admin sets a password for the user manually.

    In class “Expire_User_Passwords” in function “init” add:
    add_action( 'profile_update', array( __CLASS__, 'save_user_meta_profile_update' ), 10, 2 );

    I’ve implemented the function as such:

    public static function save_user_meta_profile_update($user_id, $old_user_data){
    		
    		update_option('onecity_save_user_meta_profile_update_' . microtime(true), json_encode($user_id));
    		self::save_user_meta($user_id);
    
    	}

    I much appreciate your help on this.
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Miller

    (@millermedianow)

    Hi, thanks for the suggestion! Can you elaborate a bit more on what this would be used for? Is this to make note of when a user’s password has been updated by an admin so it expires correctly?

    Thread Starter shaharel

    (@shaharel)

    Yes
    I noticed that when the admin changed password the expire date was not updated, so I checked the above code and it seems to do the job.
    Glad to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add profile_update action for password set by admin’ is closed to new replies.