PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.14
Booktics – Appointment Booking Calendar for Service Businesses v1.0.14
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
booktics / core / admin / team-member-password-reset.php

team-member-password-reset.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.14, at core/admin/team-member-password-reset.php

43 lines 918 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Booktics\Admin;
4
5 use Booktics\Contracts\Hookable_Service_Contract;
6 use Booktics\Models\Team_Member_Model;
7
8 /**
9 * Handles team member password reset functionality
10 *
11 * @package Booktics\Admin
12 */
13 class Team_Member_Password_Reset implements Hookable_Service_Contract {
14
15 /**
16 * Register WordPress hooks
17 *
18 * @return void
19 */
20 public function register() {
21 add_action(
22 'password_reset', array(
23 $this,
24 'password_reset_action',
25 ), 10, 2
26 );
27 }
28
29 /**
30 * Handle password reset action for team members
31 *
32 * @param $user
33 * @param $new_pass
34 *
35 * @return void
36 */
37 public function password_reset_action( $user, $new_pass ) {
38 $team_member_id = $user->ID;
39 $team_member = new Team_Member_Model( $team_member_id );
40 $team_member->update( array( 'status' => 'active' ) );
41 }
42 }
43