Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: Dashboard API > Methods and objects of the dashboard API > Usable methods

Current user name (getCurrentUsername)

Scroll Prev Top Next More

Please note: This method is deprecated. Use the method getUsername of the ApiUser-Object instead.

The function allows you to determine the user who is currently signed into JobRouter.

The function returns the user name as a string.

You may use this function in e.g. the isAuthorized method to share a widget only for certain users.

Example:

$currentUsername = $this->getCurrentUsername();