function flickr_urls_lookupuser in Flickr 7
Return a user's NSID, given their alias.
Parameters
string $alias: Username to look for.
Return value
array Response from the flickr method flickr.people.findByUsername. (https://www.flickr.com/services/api/flickr.people.findByUsername.html)
1 call to flickr_urls_lookupuser()
- flickr_user_find_by_identifier in ./
flickr.inc - Tries to match an 'identifier' onto a flickr nsid.
File
- ./
flickr.api.inc, line 278 - Flickr API functions.
Code
function flickr_urls_lookupuser($alias) {
$response = flickr_request('flickr.urls.lookupUser', array(
'url' => 'https://www.flickr.com/photos/' . $alias,
), $cacheable = FALSE, $return_errors = TRUE);
if ($response) {
if ($response['stat'] == 'ok') {
return $response['user'];
}
}
return FALSE;
}