You are here

function flag_properties_get_user_sid in Flag 7.3

Getter callback that returns the SID of the user that is being retrieved.

Callback for hook_entity_property_info_alter().

Parameters

stdobj $entity: The entity object representing a user for which we are getting inforamtion for.

array $options: Options reguarding the nature of the entity. Language, etc.

string $name: The name of the property we are running this callback for.

string $entity_type: The type that the stdobj $entity is supposed to be.

$property_info: The ifnromatin that represents the property we are providing a result for.

Return value

an integer representing the user's sid field from the session_api table

1 string reference to 'flag_properties_get_user_sid'
flag_entity_property_info_alter in ./flag.info.inc
Implements hook_entity_property_info_alter().

File

./flag.module, line 2682
The Flag module.

Code

function flag_properties_get_user_sid($entity, array $options, $name, $entity_type, $property_info) {
  $sid = flag_get_sid($entity->uid, FALSE);
  return $sid;
}