You are here

function flickr_userid_block_validate in Flickr 7

Same name and namespace in other branches
  1. 6 block/flickr_block.module \flickr_userid_block_validate()

Validate user input on 'user Flickr ID'.

1 string reference to 'flickr_userid_block_validate'
flickr_block_configure in block/flickr_block.module
Implements hook_block_configure().

File

block/flickr_block.module, line 591
The Flickr block module

Code

function flickr_userid_block_validate($element) {
  $uid = trim($element['#value']);
  if ($uid && $uid != 'public') {
    $user = flickr_user_find_by_identifier($uid);
    if (!$user) {
      form_set_error('flickr_block_{$delta}_user_id', t('<strong>Flickr User ID</strong>: %uid does not appear to be a valid Flickr user.', array(
        '%uid' => $uid,
      )));
    }
  }
}