www.legu.cc/application/User/Controller/OauthadminController.class.php
2021-09-06 11:50:33 +08:00

44 lines
1.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* 参 数:
* 作 者lht
* 功 能OAth2.0协议下第三方登录数据报表
* 修改日期2013-12-13
*/
namespace User\Controller;
use Common\Controller\AdminbaseController;
class OauthadminController extends AdminbaseController {
// 后台第三方用户列表
public function index(){
$oauth_user_model=M('OauthUser');
$count=$oauth_user_model->where(array("status"=>1))->count();
$page = $this->page($count, 20);
$lists = $oauth_user_model
->where(array("status"=>1))
->order("create_time DESC")
->limit($page->firstRow . ',' . $page->listRows)
->select();
$this->assign("page", $page->show('Admin'));
$this->assign('lists', $lists);
$this->display();
}
// 后台删除第三方用户绑定
public function delete(){
$id = I('get.id',0,'intval');
if(empty($id)){
$this->error('非法数据!');
}
$result = M("OauthUser")->where(array("id"=>$id))->delete();
if ($result!==false) {
$this->success("删除成功!", U("oauthadmin/index"));
} else {
$this->error('删除失败!');
}
}
}