示例#1
0
             }
         }
         if ($affected_users > 0) {
             $msg = __('The selected users were marked as inactive.', 'cftp_admin');
             echo system_message('ok', $msg);
             $log_action_number = 28;
         }
         break;
     case 'delete':
         foreach ($selected_users as $work_user) {
             /**
              * A user should not be able to delete himself
              */
             if ($work_user != $my_info['id']) {
                 $this_user = new UserActions();
                 $delete_user = $this_user->delete_user($work_user);
                 $affected_users++;
             } else {
                 $msg = __('You cannot delete your own account.', 'cftp_admin');
                 echo system_message('error', $msg);
             }
         }
         if ($affected_users > 0) {
             $msg = __('The selected users were deleted.', 'cftp_admin');
             echo system_message('ok', $msg);
             $log_action_number = 16;
         }
         break;
 }
 /** Record the action log */
 foreach ($selected_users as $user) {