You are here

function acl_save_form in ACL 5

Same name and namespace in other branches
  1. 8 acl.admin.inc \acl_save_form()
  2. 6 acl.admin.inc \acl_save_form()
  3. 7 acl.admin.inc \acl_save_form()

Write the results of a form.

File

./acl.module, line 120
acl.module

Code

function acl_save_form($form) {
  $users = unserialize($form['user_list']);
  db_query('DELETE FROM {acl_user} WHERE acl_id = %d', $form['acl_id']);
  foreach ($users as $uid => $name) {
    db_query('INSERT INTO {acl_user} (acl_id, uid) VALUES (%d, %d)', $form['acl_id'], $uid);
  }
}