Skip to content

Problem with $user->syncGroups #276

Closed

Description

@ondequadre

I don't know exactly if I am doing something wrong or there is a problem with syncGroups()

If I do this:

$groups = "'" . implode("', '", $this->request->getPost('groups')) . "'";
$user->syncGroups($groups);

Returns this error:

CodeIgniter\Shield\Authorization\AuthorizationException #401
'admin', 'user' is not a valid group. 

if I manually insert the groups:

$user->syncGroups('admin','user');

then it works...

Activity

  1. locked and limited conversation to collaborators on Jul 3, 2022
  2. converted this issue into a discussion #277 on Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions