public function Subscriber::getUserId in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getUserId()
- 8 src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getUserId()
Returns corresponding user ID.
Return value
int The corresponding user ID.
Overrides SubscriberInterface::getUserId
2 calls to Subscriber::getUserId()
- Subscriber::getUser in src/
Entity/ Subscriber.php - Returns corresponding User object, if any.
- Subscriber::preSave in src/
Entity/ Subscriber.php - Acts on an entity before the presave hook is invoked.
File
- src/
Entity/ Subscriber.php, line 104
Class
- Subscriber
- Defines the simplenews subscriber entity.
Namespace
Drupal\simplenews\EntityCode
public function getUserId() {
return $this
->get('uid')->target_id;
}