Error on login page

On example.com/admin one person gets an error, no matter which browser or tablet.
It works fine for me and others. Don’t see what’s causing it.

Error in grav.log:

[2016-01-25 15:18:11] grav.CRITICAL: Invalid argument supplied for foreach() - Trace: #0 /home/example/public_html/system/src/Grav/Common/User/User.php(159): Whoops\Run->handleError(2, ‘Invalid argumen…’, ‘/home/exam…’, 159, Array) #1 /home/example/public_html/user/plugins/login/login.php(426): Grav\Common\User\User->authorize(‘admin.login’) #2 [internal function]: Grav\Plugin\LoginPlugin->authorizePage(Object(RocketTheme\Toolbox\Even t\Event), ‘onPageInitializ…’, Object(RocketTheme\Toolbox\Event\EventDispatcher)) #3 /home/example/public_html/vendor/symfony/event-dispatcher/EventDispatc her.php(181): call_user_func(Array, Object(RocketTheme\Toolbox\Event\Event), ‘onPageInitializ…’, Object(RocketTheme\Toolbox\Event\EventDispatcher)) #4 /home/example/public_html/vendor/symfony/event-dispatcher/EventDispatc her.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, ‘onPageInitializ …’, Object(RocketTheme\Toolbox\Event\Event)) #5 /home/example/public_html/vendor/rockettheme/toolbox/Event/src/EventDi spatcher.php(23): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(‘onPageIni tializ…’, Object(RocketTheme\Toolbox\Event\Event)) #6 /home/example/public_html/system/src/Grav/Common/Grav.php(407): RocketTheme\Toolbox\Event\EventDispatcher->dispatch(‘onPageInitializ… .’, NULL) #7 /home/example/public_html/system/src/Grav/Common/Grav.php(247): Grav\Common\Grav->fireEvent(‘onPageInitializ…’) #8 /home/example/public_html/index.php(38): Grav\Common\Grav->process() #9 {main} [] []

Can you paste that user’s configuration file? you can leave out the hashed password, name and email if you’d like

i believe that you may have a groups setting set incorrectly

Possible, did you set user/config/groups.yaml? What’s its content?

This is the content of groups.yaml

redacteuren:
  groupname: redacteuren
  readableName: Redacteuren
  description: 'Redactie van de site'
  icon: child
  access:
    admin:
      login: true
    site:
      login: true

Content of username.yaml

email: info@example.nl
access:
  admin:
    login: 'true'
    super: true
  site:
    login: 'true'
fullname: 'John Doe'
title: redacteur
state: enabled
hashed_password:
###
language: en
groups: redacteuren

Thanks for pointing me in the right direction. Without the group rights it works. There must be a typo somewhere.

Ok in the user yaml, groups expects an array. Use:

groups:
  - redacteuren

I will make sure this will not be an error any more by making sure a single group works as well.

I now see this was in the docs, so was a suggested usage, but didn’t work as expected. Already fixed in the code for the next release.

Thanks!