User tests: Successful: Unsuccessful:
Added a helper method for getting the title of a group by its id.
I've not found any method to do this in the Joomla documentation so i put it it.
This example will echo out the title of every group that a user is in:
// Get the JUser object of the current user
$user = JFactory::getUser();
// Get an array of the group id's that the current user is in.
$groups = JAccess::getGroupsByUser($user->id);
// Loop through each group id
foreach ($groups as $groupId) {
// Print out the title of that group
echo JAccess::getGroupTitle($groupId);
}
Labels |
Added:
?
|
Category | ⇒ | ACL Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
@zero-24 Sure
This example will echo out the title of every group that a user is in:
// Get the JUser object of the current user
$user = JFactory::getUser();
// Get an array of the group id's that the current user is in.
$groups = JAccess::getGroupsByUser($user->id);
// Loop through each group id
foreach ($groups as $groupId) {
// Print out the title of that group
echo JAccess::getGroupTitle($groupId);
}
Status | Pending | ⇒ | Ready to Commit |
Easy | No | ⇒ | Yes |
Thanks @test successful
Status | Ready to Commit | ⇒ | Pending |
Patch works as intended.
Status | Pending | ⇒ | Ready to Commit |
RTC Thanks
Labels |
Added:
?
|
What does RTC stand for?
What does RTC stand for?
Ready to commit. So the changes works as expected and a maintainer need to take a decision to include or not Thanks
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-07-11 14:50:39 |
Closed_By | ⇒ | mbabker |
Labels |
Removed:
?
|
@HelgeSverre I have just send you a quick CS PR.
Can you add some example code for the testers?