public function admin_members() { include_once SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-members.php'; $members = new SwpmMembers(); $action = filter_input(INPUT_GET, 'member_action'); $action = empty($action) ? filter_input(INPUT_POST, 'action') : $action; $output = ''; switch ($action) { case 'add': case 'edit': $members->process_form_request(); break; default: $output = apply_filters('swpm_admin_member_menu_details_hook', '', $action); if (empty($output)) { $output = $members->show(); } $selected = $action; include_once SIMPLE_WP_MEMBERSHIP_PATH . 'views/admin_members.php'; break; } }
public static function delete_user_by_id($id) { $user_name = SwpmUtils::get_user_by_id($id); SwpmMembers::delete_wp_user($user_name); SwpmMembers::delete_swpm_user_by_id($id); }
public function delete() { if (!$this->is_logged_in()) { return; } $user_name = $this->get('user_name'); $user_id = $this->get('member_id'); wp_clear_auth_cookie(); $this->logout(); SwpmMembers::delete_swpm_user_by_id($user_id); SwpmMembers::delete_wp_user($user_name); }
public static function delete_user_by_id($id) { $swpm_user = SwpmMemberUtils::get_user_by_id($id); $user_name = $swpm_user->user_name; SwpmMembers::delete_wp_user($user_name); //Deletes the WP User record SwpmMembers::delete_swpm_user_by_id($id); //Deletes the SWPM record }
public function admin_members_menu() { include_once SIMPLE_WP_MEMBERSHIP_PATH . 'classes/class.swpm-members.php'; $members = new SwpmMembers(); $members->handle_main_members_admin_menu(); }
public static function delete_user_by_id($id) { if (!is_numeric($id)) { wp_die('Error! Member ID must be numeric.'); } $swpm_user = SwpmMemberUtils::get_user_by_id($id); $user_name = $swpm_user->user_name; SwpmMembers::delete_wp_user($user_name); //Deletes the WP User record SwpmMembers::delete_swpm_user_by_id($id); //Deletes the SWPM record }