runphp / ucenter-client
Ucenter 客户端
dev-master
2014-01-02 01:56 UTC
Requires
- php: >=5.3
- zendframework/zendframework: 2.*
Requires (Dev)
- zf-commons/zfc-user: 0.*
This package is auto-updated.
Last update: 2024-09-15 15:38:17 UTC
README
简介
UcenterClient 是一个为 zf2 开发的 ucenter 客户端。
[ucenter]http://www.comsenz.com/products/ucenter
安装
将此项目下载到 ./vendor/ 或 ./modules/
安装后
-
在您的
application.config.php文件中启用它。<?php return array( 'modules' => array( 'UcenterClient', ), // ... );
-
将
config/ucenter.global.php.dist文件复制到您的./config/autoload目录。(移除 .dist 部分)并配置它 -
使用
// ... $cookie = $this->getRequest()->getCookie(); if ($cookie->offsetExists('ucenter_auth')) { $param = $cookie->offsetGet('ucenter_auth'); $uc = $this->getServiceLocator()->get('ucenter_service'); $user = $uc->getUser($param); } // ...
-
如有任何问题,请发送电子邮件至 runphp@qq.com