public static function Og::isMemberPending in Organic groups 8
Returns whether a user belongs to a group with a pending status.
Parameters
\Drupal\Core\Entity\EntityInterface $group: The group entity.
\Drupal\Core\Session\AccountInterface $user: The user entity.
Return value
bool True if the membership is pending.
See also
\Drupal\og\Og::isMember
2 calls to Og::isMemberPending()
- GetUserGroupsTest::testIsMemberStates in tests/
src/ Kernel/ Entity/ GetUserGroupsTest.php - Tests member methods for states that other groups users are added to.
- SubscriptionController::subscribe in src/
Controller/ SubscriptionController.php - Subscribe a user to group.
File
- src/
Og.php, line 226
Class
- Og
- A static helper class for OG.
Namespace
Drupal\ogCode
public static function isMemberPending(EntityInterface $group, AccountInterface $user) {
return static::isMember($group, $user, [
OgMembershipInterface::STATE_PENDING,
]);
}