You are here

function _advuser_update_never_accessed in Advanced User 7.3

Same name and namespace in other branches
  1. 6.3 advuser.module \_advuser_update_never_accessed()
1 call to _advuser_update_never_accessed()
advuser_user_ in ./advuser.module
hook_user implementation

File

./advuser.module, line 401
Advanced user module allows you to select users based on an advanced set of filtering and apply actions to block, unblock, delete or email the selected users.

Code

function _advuser_update_never_accessed($uid) {
  global $user;
  if ($user->uid != $uid && user_access('administer users')) {
    return db_update('users')
      ->fields(array(
      'access' => 0,
    ))
      ->condition('uid', $uid, '=')
      ->execute();
  }
}