コード例 #1
0
 /**
  * User Register
  * Runs on user registration.
  */
 function user_register($user_id)
 {
     if (isset($_POST['expire_users']) && 'auto' == $_POST['expire_users']) {
         $expire_settings = $this->admin->settings->get_default_expire_settings();
         $expire_data = array('expire_user_date_type' => $expire_settings['expire_user_date_type'], 'expire_user_date_in_num' => $expire_settings['expire_user_date_in_num'], 'expire_user_date_in_block' => $expire_settings['expire_user_date_in_block'], 'expire_user_date_on_timestamp' => $expire_settings['expire_timestamp'], 'expire_user_role' => $expire_settings['expire_user_role'], 'expire_user_reset_password' => $expire_settings['expire_user_reset_password'], 'expire_user_email' => $expire_settings['expire_user_email'], 'expire_user_email_admin' => $expire_settings['expire_user_email_admin'], 'expire_user_remove_expiry' => $expire_settings['expire_user_remove_expiry']);
         $user = new Expire_User($user_id);
         $user->set_expire_data($expire_data);
         $user->save_user();
     }
 }
コード例 #2
0
 /**
  * Save Extra User Profile Fields
  */
 function save_extra_user_profile_fields($user_id)
 {
     if (!current_user_can('edit_user', $user_id)) {
         return false;
     }
     $user = new Expire_User($user_id);
     $user->set_expire_data($_POST);
     $user->save_user();
 }