You are here

function role_watchdog_form_alter in Role Watchdog 5

Implementation of hook_form_alter()

Adds submit hook to monitor role changes.

Parameters

$form_id: A unique string identifying the form.

$form: An associative array containing the structure of the form.

File

./role_watchdog.module, line 100
Logs changes to user roles.

Code

function role_watchdog_form_alter($form_id, &$form) {
  if ($form_id == 'user_admin_account') {
    if (user_access('administer access control')) {
      $form['#submit'] = array(
        'role_watchdog_user_admin_account_submit' => array(),
      ) + (array) $form['#submit'];
    }
  }
}