function weather_access_userblock in Weather 7.2
Same name and namespace in other branches
- 7.3 weather.module \weather_access_userblock()
- 7 weather.module \weather_access_userblock()
Checks whether the user has access to their own custom weather block.
Parameters
int $uid: User id.
Return value
bool TRUE or FALSE.
1 call to weather_access_userblock()
- weather_block_view in ./
weather.module - Implements hook_block_view().
1 string reference to 'weather_access_userblock'
- weather_menu in ./
weather.module - Implements hook_menu().
File
- ./
weather.module, line 593 - Display current weather data from many places in the world.
Code
function weather_access_userblock($uid = NULL) {
global $user;
// If $uid is not set, just check for the access permission.
if (is_null($uid) || $user->uid == $uid) {
return user_access('administer custom weather block');
}
return FALSE;
}