public function TokenAuthUser::enforceIsNew in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::enforceIsNew()
- 8 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::enforceIsNew()
- 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::enforceIsNew()
- 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::enforceIsNew()
Enforces an entity to be new.
Allows migrations to create entities with pre-defined IDs by forcing the entity to be new before saving.
Parameters
bool $value: (optional) Whether the entity should be forced to be new. Defaults to TRUE.
Return value
$this
Overrides EntityInterface::enforceIsNew
See also
\Drupal\Core\Entity\EntityInterface::isNew()
File
- src/
Authentication/ TokenAuthUser.php, line 286
Class
- TokenAuthUser
- The decorated user class with token information.
Namespace
Drupal\simple_oauth\AuthenticationCode
public function enforceIsNew($value = TRUE) {
return $this->subject
->enforceIsNew($value);
}