public function UserStatus::resolve in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserStatus.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserStatus::resolve()
- 10.1.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserStatus.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserStatus::resolve()
- 10.2.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserStatus.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserStatus::resolve()
Resolves the value for this data producer.
Parameters
\Drupal\user\UserInterface $user: The user to get the status from.
Return value
string The status of the user ("ACTIVE" or "BLOCKED").
File
- modules/
social_features/ social_user/ src/ Plugin/ GraphQL/ DataProducer/ UserStatus.php, line 37
Class
- UserStatus
- Returns the status for a user.
Namespace
Drupal\social_user\Plugin\GraphQL\DataProducerCode
public function resolve(UserInterface $user) {
return $user
->isActive() ? "ACTIVE" : "BLOCKED";
}