Exemplo n.º 1
0
     $edit_Plugin->Settings->dbupdate();
     $action = 'edit';
     break;
 case 'search':
     // Quick search
     // Check that this action request is not a CSRF hacked request:
     $Session->assert_received_crumb('user');
     param('user_search', 'string', '');
     set_param('keywords', $user_search);
     set_param('filter', 'new');
     load_class('users/model/_userlist.class.php', 'UserList');
     $UserList = new UserList('admin', $UserSettings->get('results_per_page'), 'users_', array('join_city' => false));
     $UserList->load_from_Request();
     // Make query to get a count of users
     $UserList->query();
     if ($UserList->get_total_rows() == 1) {
         // If we find only one user by quick search we do a redirect to user's edit page
         $User = $UserList->rows[0];
         if (!empty($User)) {
             header_redirect('?ctrl=user&user_tab=profile&user_ID=' . $User->user_ID);
         }
     }
     // Unset the filter to avoid the step 1 in the function $UserList->query() on the users list
     set_param('filter', '');
     break;
 case 'remove_sender_customization':
     // Check that this action request is not a CSRF hacked request:
     $Session->assert_received_crumb('users');
     // Check required permission
     $current_User->check_perm('users', 'edit', true);
     // get the type of the removable sender customization