I'm trying to get the name of a group based on the group number. I've built a driver called LoupeAuth that extends SimpleAuth, and I added the following to /fuel/app/bootstrap.php:
My create, update and delete user methods work flawlessly. I don't need to extend the functionality of the SimpleGroup or SimpleAcl, as the default functionality is fine for my needs. However, when I try to call the SimpleGroup method get_name($group), I'm unable to. Specifically, when I try to call:
ErrorException [ Error ]: Call to a member function get_name() on a non-object
If I try:
\Auth\Auth_Group_SimpleGroup::get_name(80);
I get the error:
ErrorException [ Runtime Notice ]: Non-static method Auth\Auth_Group_SimpleGroup::get_name() should not be called statically, assuming $this from incompatible context
If I try:
$group = new \Auth\Auth_Group_SimpleGroup;
$group_name = $group->get_name(80);
I get the error:
ErrorException [ Error ]: Call to protected Auth\Auth_Driver::__construct() from context 'Controller\Admin_Users'
I could easily setup a function within my controller that resolves the group name based on hard-coded group definitions, but I'd rather do it the "right" way, so that if group definitions change in the future, I don't have to modify my controller. Am I way off base here?
Because the Auth author didn't document anything. And he isn't around to kick anymore.
I did my best to document it through reverse engineering, but obviously I missed stuff. Feel free to clone the repo, make the changes, and send a pull request.