You are here

function simple_access_profile_list_submit in Simple Access 5.2

Same name and namespace in other branches
  1. 6.2 simple_access.admin.inc \simple_access_profile_list_submit()
  2. 7.2 simple_access.admin.inc \simple_access_profile_list_submit()

File

./simple_access.module, line 636
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function simple_access_profile_list_submit($form_id, $form_values) {
  foreach ($form_values['profiles'] as $pid => $profile) {
    db_query('UPDATE simple_access_profiles SET weight = %d WHERE pid = %d', $profile['weight'], $pid);
  }
}