January 2002
Intermediate to advanced
288 pages
8h 45m
English
getCurrentUser — retrieves information about the current user by key or as a hash reference
my $user = getCurrentUser(); my $value = getCurrentUser($name);
With no parameters, getCurrentUser returns a hash
reference of the current user’s information. If the optional
$name parameter is provided, it returns the associated
value within the user information, if present, and the undefined value if not.
This is exported from Slash::Utility. If the program is
not running under mod_perl, and if
createEnvironment has not been called, the hash reference
may be empty.
use Slash::Utility;
my $user = getCurrentUser();
my $nickname = getCurrentUser('nickname');Read now
Unlock full access