CallBackery::User - tell me about the current user
use CallBackery::User; my $user = CallBackery::User->new($self->controller); $user->werk; $user->may('right'); # does the user have the given right $user->id;
All the methods if Mojo::Base as well as the following
By default the userId is numeric and represents a user account. For system tasks, it gets set to alphabetic identifiers. The following alphabetic identifiers do exist:
__CONSOLE when running in the config console mode __CONFIG for backup and restore tasks
return the user id if the session user is valid.
a handle to a CallBackery::Database object.
returns a pointer to one of the Database object of a Mojo::Pg instance.
returns a hash of information about the current user.
returns a human readable login name for the current user
Extracts the session config from the cookie from the X-Session-Cookie header or the xsc parameter. If the xsc parameter is set, its timestamp must be no older than 2 seconds.
login the user object. If login return 1 you can then makeSessionCookie.
Check if the user has the right indicated.
Returns a timestamped, signed session cookie containing the current userId.
Copyright (c) 2013 by OETIKER+PARTNER AG. All rights reserved.
Tobi Oetiker <email@example.com>
2010-06-12 to 1.0 initial 2013-11-19 to 1.1 mojo port