public function WebformAccessGroup::addUserId in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_access/src/Entity/WebformAccessGroup.php \Drupal\webform_access\Entity\WebformAccessGroup::addUserId()
Add user id to webform access group.
Parameters
int $uid: A user id.
Return value
$this
Overrides WebformAccessGroupInterface::addUserId
File
- modules/
webform_access/ src/ Entity/ WebformAccessGroup.php, line 240
Class
- WebformAccessGroup
- Defines the webform access group entity.
Namespace
Drupal\webform_access\EntityCode
public function addUserId($uid) {
if (!in_array($uid, $this->userIds)) {
$this->userIds[] = $uid;
}
return $this;
}