public function SocialApi::getUserId in Social API 3.x
Same name and namespace in other branches
- 8.2 src/Entity/SocialApi.php \Drupal\social_api\Entity\SocialApi::getUserId()
Gets the Drupal user ID associated to the record.
Return value
int User ID.
File
- src/
Entity/ SocialApi.php, line 32
Class
- SocialApi
- Defines a base class for Social API content entities.
Namespace
Drupal\social_api\EntityCode
public function getUserId() {
return (int) $this
->get('user_id')->target_id;
}