Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Security API > Methods

Security API: getUserName 

Scroll Prev Next More

 

Returns the current Username.

Syntax

Security::getUserName()

Arguments

No arguments.

Return value

Returns the current Username.

Example

This example shows how to output the current user data:

 

$userData = Security::getUserName();
echo $userData;

Sample output

admin_user

See also:

Security API: getUserGroup

Security API: getUserGroups

Security API: setAllowedPages

Example: Hide controls on Add/Edit pages, based on the username

About Security API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software