You are here

function flickrapi_is_nsid in Flickr API 7

Same name and namespace in other branches
  1. 5 flickrapi.module \flickrapi_is_nsid()
  2. 6 flickrapi.module \flickrapi_is_nsid()
  3. 7.2 flickrapi.module \flickrapi_is_nsid()

Do a preg_match to check if the given ID is a valid Flickr user ID.

Parameters

String $id: identifier to find an nsid for

Return value

Boolean TRUE/FALSE

2 calls to flickrapi_is_nsid()
FlickrApiTestCase::testflickrapi_is_nsid in tests/flickrapi.test
flickrapi_get_user_nsid in ./flickrapi.module
Tries to match an 'identifier' onto a flickr nsid.

File

./flickrapi.module, line 237
FlickAPI integration module.

Code

function flickrapi_is_nsid($id) {
  return preg_match('/^\\d+@N\\d+$/', $id) ? TRUE : FALSE;
}