March 2020
Beginner
660 pages
18h 28m
English
Use the following steps to make user passwords automatically expire and ask the users to reset their password:
function wpcpp_ch12_register_password_expire_reset($user_id){ $expire_date = date('Y-m-d', strtotime('+1 month')); update_user_meta($user_id,'wpccp_password_expire_date',$expire_date);}add_action( 'user_register', 'wpcpp_ch12_register_password_expire_reset', 10, 1 );// Step 3 code should be placed after this line
Read now
Unlock full access