Back to Littlefoot Manual


Load user from current session

$sessionUser = (new User)->fromSession()

Check if logged in user has 'admin' acl

$isAdmin = (new User)->fromSession()->hasAccess('admin')

LF Installer

This is how the lf installer creates the admin user and auto-logs them in

// Add admin user
(new User)
->toSession(); // and auto login as that user
blog comments powered by Disqus