You are here

protected function ActivityActionHandler::getUid in Activity 7

Return the user id that matches the provided key in the templates.

Parameters

string $key: The message key.

array $objects: All the objects for the Activity.

Return value

int

1 call to ActivityActionHandler::getUid()
ActivityActionHandler::tokenize in ./activity_action_handlers.inc
Tokenize based on the provided objects
1 method overrides ActivityActionHandler::getUid()
CommentActivityActionHandler::getUid in ./activity_action_handlers.inc
Return the user id that matches the provided key in the templates.

File

./activity_action_handlers.inc, line 251

Class

ActivityActionHandler

Code

protected function getUid($key, $objects) {
  if ($key == 'public') {
    return 0;
  }
  elseif ($key == 'current_user') {
    return $GLOBALS['user']->uid;
  }
  if (isset($objects[$key]) && isset($objects[$key]->uid)) {
    return $objects[$key]->uid;
  }
  return FALSE;
}