Hello all, been struggling with handling the users() collection recently, I can’t seem to return anything other than the username and avatar of a user. When I try to call ->firstName() or any other custom field, or try to run a filterBy(‘role’, ‘xxx’), PHP throws some fatal errors at me.
I’ve seen these two errors come up:
Undefined offset: 2 line 274 code 8 file /kirby/toolkit/lib/collection.php
and
Call to undefined method Data::read() in /kirby/core/user.php on line 46
Anyone know what’s happening here? Any help would be much, much appreciated, thanks!
Hm, there’s nothing wrong with that code, I just threw it at my test install and everything is fine, apart from the firstName throwing an error because I don’t have a user called ‘laciel’.
Alright, definitely strange! It works fine on a fresh starterkit. So what could even possibly be causing this issue on my other website? What a strange situation!