function tinybrowser_user_page_access in TinyBrowser 7
Check if the tinybrowser is available at user account page
1 string reference to 'tinybrowser_user_page_access'
- tinybrowser_menu in ./
tinybrowser.module - Implements hook_menu
File
- ./
tinybrowser.userpage.inc, line 7
Code
function tinybrowser_user_page_access($account, $user = FALSE) {
if ($user === FALSE) {
global $user;
}
if ($user->uid == 1) {
return TRUE;
}
if ($account->uid == $user->uid && tinybrowser_access($user)) {
$profile = tinybrowser_get_user_profile($user);
if ($profile['permissions']['userpage']) {
return TRUE;
}
}
return FALSE;
// return $user->uid == 1 || ($account->uid == $user->uid && tinybrowser_access($user));
}