New in 1.41.0 (BETA)

currentUser()

Returns the current user.

Scrivito.currentUser returns the logged-in user (visitor) with their email address, id, name, and profile picture.

Returns

A User instance if the user is logged in, otherwise null.

Remarks

Returns null while loading.

Calling Scrivito.currentUser does not trigger an automatic login redirect.