UcenterClient is a ucenter client for zf2.
[ucenter]http://www.comsenz.com/products/ucenter
download this project it into ./vendor/
or ./modules/
-
Enabling it in your
application.config.php
file.<?php return array( 'modules' => array( 'UcenterClient', ), // ... );
-
Copy the
config/ucenter.global.php.dist
file into your./config/autoload
directory. (Remove the .distpart) and configure it -
use
// ... $cookie = $this->getRequest()->getCookie(); if ($cookie->offsetExists('ucenter_auth')) { $param = $cookie->offsetGet('ucenter_auth'); $uc = $this->getServiceLocator()->get('ucenter_service'); $user = $uc->getUser($param); } // ...
-
Any problem email to runphp@qq.com