$users->current()
Returns the current element
$users->current(): Kirby\Cms\User
Return type
This method modifies the existing $users
object it is applied to and returns it again.
Parent class
Kirby\Cms\Users
inherited from Kirby\Toolkit\Iterator
Details
Note that this method does not get the currently logged in user, but the current user in the collection. To get the currently logged in user, use $user = $kirby->user()
.