You are here

function persistent_login_erase_access in Persistent Login 7

Same name and namespace in other branches
  1. 6 persistent_login.module \persistent_login_erase_access()

Access callback to check permission to erase user's Persistent Login records.

1 string reference to 'persistent_login_erase_access'
persistent_login_menu in ./persistent_login.module
Implements hook_menu().

File

./persistent_login.module, line 102
Provide a "Remember Me" checkbox in the login form.

Code

function persistent_login_erase_access($uid = NULL) {
  global $user;
  if ($user->uid) {
    if (empty($uid)) {
      $uid = $user->uid;
    }
    if ($user->uid == $uid || user_access('administer persistent login')) {
      return TRUE;
    }
  }
  return FALSE;
}