后台控制器中如何获取到管理员的角色组ID?

获取管理员的ID,使用的是$this->auth->id
但是我想获取到该管理员的角色组ID,请问怎么写?

 

 

//获取管理员所属于的分组
$this->auth->getGroups()

//获取管理员所属于的分组ID
$this->auth->getGroupIds()

//取出当前管理员所拥有权限的分组
$this->auth->getChildrenGroupIds(true)

原文地址:https://www.cnblogs.com/apolloren/p/14451135.html