Changeset 10580 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
- Timestamp:
- 01/14/2021 06:30:11 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r10578 r10580 1285 1285 /** 1286 1286 * Catch a user being blocked / unblocked and set their password appropriately. 1287 * 1288 * Note: This method is called even when the users role is not changed. 1287 1289 */ 1288 1290 public function user_blocked_password_handler( $new_role, $user_id, \WP_User $user ) { … … 1319 1321 $manager->destroy_all(); 1320 1322 1323 // Add a user note about this action. 1324 Plugin::get_instance()->user_notes->add_user_note( 1325 $user->ID, 1326 sprintf( 1327 'Forum role changed to %s.', 1328 get_role( $new_role )->name 1329 ) 1330 ); 1321 1331 } else if ( 1322 1332 $password_broken && … … 1336 1346 1337 1347 clean_user_cache( $user ); 1338 } 1348 1349 // Add a user note about this action. 1350 Plugin::get_instance()->user_notes->add_user_note( 1351 $user->ID, 1352 sprintf( 1353 'Forum role changed to %s.', 1354 get_role( $new_role )->name 1355 ) 1356 ); 1357 } 1358 1339 1359 } 1340 1360 }
Note: See TracChangeset
for help on using the changeset viewer.