@ -470,11 +470,16 @@ class AdminController extends Controller {
* @return array|false
* 返回数据集
*/
protected function lists ($model,$where=array(),$order='',$field=true){
protected function lists ($model,$where=array(),$order='',$field=true,$check_subsite=false){
$options = array();
$REQUEST = (array)I('request.');
if(is_string($model)){
$model = M($model);
if($check_subsite){
$model = SM($model);
}else{
}
$OPT = new \ReflectionProperty($model,'options');
@ -90,7 +90,7 @@ class AuthManagerController extends AdminController{
* @author 朱亚杰 <zhuyajie@topthink.net>
public function index(){
$list = $this->lists('AuthGroup',array('module'=>'admin'),'id asc');
$list = $this->lists('AuthGroup',array('module'=>'admin'),'id asc',true,true);
$list = int_to_string($list);
$this->assign( '_list', $list );
$this->assign( '_use_tip', true );
@ -502,6 +502,7 @@ class UserController extends AdminController
$this->assign("authid", $au["group_id"]);
$this->assign("houtai", $au["houtai"]);
$list = D('AuthGroup')->where(array('status' => 1))->select();
dd(D('AuthGroup'));
$username = $_POST['username'];
$password = $_POST['password'];
$this->assign('lists', $list);
@ -15,7 +15,7 @@ use Think\Model;
* Class AuthGroupModel
class AuthGroupModel extends SubsiteModel {
class AuthGroupModel extends Model {
const TYPE_ADMIN = 1; // 管理员用户组类型标识
const MEMBER = 'member';
const UCENTER_MEMBER = 'ucenter_member';
@ -634,7 +634,7 @@ function M($name='', $tablePrefix='',$connection='') {
* @param boolean $is_subsiteTable 是否强制使用子站
* @return Think\Model
function SM($name='', $tablePrefix='tab_',$is_subsiteTable=false)
function SM($name='', $tablePrefix='sys_',$is_subsiteTable=false)
{
if(empty($name)){
if(IS_SUBSITE){