{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6994","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6994/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6994/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6994/events","html_url":"https://github.com/joomla/joomla-cms/pull/6994","id":78469497,"number":6994,"title":"Added method getGroupTitle","user":{"login":"HelgeSverre","id":1089652,"avatar_url":"https://avatars.githubusercontent.com/u/1089652?v=3","gravatar_id":"","url":"https://api.github.com/users/HelgeSverre","html_url":"https://github.com/HelgeSverre","followers_url":"https://api.github.com/users/HelgeSverre/followers","following_url":"https://api.github.com/users/HelgeSverre/following{/other_user}","gists_url":"https://api.github.com/users/HelgeSverre/gists{/gist_id}","starred_url":"https://api.github.com/users/HelgeSverre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelgeSverre/subscriptions","organizations_url":"https://api.github.com/users/HelgeSverre/orgs","repos_url":"https://api.github.com/users/HelgeSverre/repos","events_url":"https://api.github.com/users/HelgeSverre/events{/privacy}","received_events_url":"https://api.github.com/users/HelgeSverre/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/New%20Feature","name":"New Feature","color":"e102d8"},{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-20T10:32:47Z","updated_at":"2015-05-23T23:40:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6994","html_url":"https://github.com/joomla/joomla-cms/pull/6994","diff_url":"https://github.com/joomla/joomla-cms/pull/6994.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/6994.patch"},"body":"Added a helper method for getting the title of a group by its id.\r\n\r\nI've not found any method to do this in the Joomla documentation so i put it it.\r\n\r\n\r\n\r\nThis example will echo out the title of every group that a user is in:\r\n\r\n### Example\r\n```php\r\n// Get the JUser object of the current user\r\n$user \t= JFactory::getUser();\r\n\r\n// Get an array of the group id's that the current user is in.\r\n$groups = JAccess::getGroupsByUser($user->id);\r\n\r\n// Loop through each group id\r\nforeach ($groups as $groupId) {\r\n    // Print out the title of that group\r\n    echo JAccess::getGroupTitle($groupId);\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/104955124","html_url":"https://github.com/joomla/joomla-cms/pull/6994#issuecomment-104955124","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6994","id":104955124,"user":{"login":"jwaisner","id":12568201,"avatar_url":"https://avatars.githubusercontent.com/u/12568201?v=3","gravatar_id":"","url":"https://api.github.com/users/jwaisner","html_url":"https://github.com/jwaisner","followers_url":"https://api.github.com/users/jwaisner/followers","following_url":"https://api.github.com/users/jwaisner/following{/other_user}","gists_url":"https://api.github.com/users/jwaisner/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaisner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaisner/subscriptions","organizations_url":"https://api.github.com/users/jwaisner/orgs","repos_url":"https://api.github.com/users/jwaisner/repos","events_url":"https://api.github.com/users/jwaisner/events{/privacy}","received_events_url":"https://api.github.com/users/jwaisner/received_events","type":"User","site_admin":false},"created_at":"2015-05-23T23:40:10Z","updated_at":"2015-05-23T23:40:10Z","body":"@test \n\nPatch works as intended.<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"http://issues.joomla.org/tracker/joomla-cms/6994\">issues.joomla.org/joomla-cms/6994</a>.</sub>"}}