Hi together,
i am trying to access the grav.user object to check if the visitor of the website is logged in. Unfortunately this object is not filled with the correct data. E.g. username is empty.
Dumping the content of grav.user gives me the following:
`Grav\Common\User\User {#279
_media: null
gettersVariable: "items"
items: array:5 [
"username" => ""
"state" => "enabled"
"authenticated" => false
"authorized" => false
"language" => "en"
]
blueprints: Closure() {#278
class: "Grav\Common\User\DataUser\UserCollection"
this: Grav\Common\User\DataUser\UserCollection {#135 …}
file: "/mnt/work/animal_equality/git/lp-de/system/src/Grav/Common/User/DataUser/UserCollection.php"
line: "57 to 61"
}
storage: Grav\Common\File\CompiledYamlFile {#276
#filename: "/mnt/work/animal_equality/git/lp-de/user/accounts/.yaml"
#handle: null
#locked: null
#extension: ".yaml"
#raw: ""
#content: []
#settings: []
}
nestedSeparator: "."
}`
I have not found anything in the docs which gives a hint why this could happen. Would be great if someone could help me out.
Thanks a lot!