Active
Project:
Group
Version:
8.x-1.3
Component:
Group (group)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2021 at 12:26 UTC
Updated:
19 Feb 2021 at 12:27 UTC
Jump to comment: Most recent
I am trying to remove a user programmatically with the following simple code:
$group = \Drupal\group\Entity\Group::load($gid);
$user = \Drupal\user\Entity\User::load($uid);
$group->removeMember($user);
But I get this error: TypeError: Argument 1 passed to Drupal\Core\Routing\RequestContext::fromRequest() must be an instance of Symfony\Component\HttpFoundation\Request, null given
Not sure if it is a bug or just me who is doing it wrong?
Comments
Comment #2
Sleeepy commentedComment #3
Sleeepy commentedFull error: