Created
March 27, 2019 08:10
-
-
Save cgi-caesar/d7081f78796e86a6421f4266a85cdb34 to your computer and use it in GitHub Desktop.
aMember (site.php): change default sort order on browse users page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Am_Di::getInstance()->hook->add(Am_Event::ADMIN_MENU, function(Am_Event $e){ | |
if ($p = $e->getMenu()->findOneById('users-browse')) { | |
$c = $p->getParent(); | |
$c->removePage($p); | |
$c->addPage([ | |
'id' => 'users-browse', | |
'uri' => $e->getDi()->url('admin-users', ['_u_sort' => 'added DESC'], false), | |
'label' => ___('Browse Users'), | |
'resource' => 'grid_u', | |
'privilege' => 'browse', | |
'class' => 'bold', | |
'order' => 10, | |
]); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment