modUser.getDashboard
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodUser::getDashboard¶
Reads the Dashboard relation of the primary group. Without a primary group, or when the group has no dashboard of its own, it falls through to modDashboard::getDefaultDashboard().
That method looks the default up by id first and by the name Default second, and returns null when neither row exists. Nothing here guards against null: check the result before use.
Syntax¶
modDashboard getDashboard ()
Example¶
$dashboard = $user->getDashboard();
if ($dashboard) {
echo $dashboard->get('name');
}
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










