You are here

function userone_edit_access in User One 7

Augment core's user_edit_access(). Block edit access to user 1 account.

1 string reference to 'userone_edit_access'
userone_menu_alter in ./userone.module
Implements hook_menu_alter(). To prevent users from editing user 1 account.

File

./userone.module, line 44
User One module.

Code

function userone_edit_access($account) {
  if ($account->uid == 1 and $GLOBALS['user']->uid != 1) {
    return FALSE;
  }
  return user_edit_access($account);
}