Custom authentication return missing groups.

(2 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    Hello.

    We're doing custom authentication against our database, we have users and roles. Currently I'm returning the one single role with the user and putting that in the groups parameter.

    The array therefore looks like this:

    $ret = array(
    'name' => "name",
    'admin' => 0,
    'groups' => 'role_name',
    'email' => 'email@mydbr.com',
    'telephone' => ""
    );

    The array is full of data and the group name is there, but I get the following error when logging in.

    Custom authentication return missing groups.

    I have even tried hardcoding the groups parameter but still get the same error. If I set it to null the login works, but of course then I have no groups.

    Kindly assist.

  2. myDBR Team, Key Master

    The 'groups'-parameter should be an array instead of a single value, so use:

    $ret = array(
    'name' => "name",
    'admin' => 0,
    'groups' => array('role_name'),
    'email' => 'email@mydbr.com',
    'telephone' => ""
    );

    --
    myDBR Team


Reply

You must log in to post.