AddQQUserBase.php
786 Bytes
<?php
/**
* Created by PhpStorm.
* User: liuziyang
* Date: 14-3-2
* Time: 23:01
*/
class YHMAuth_Hook_AddQQUserBase extends YHMAuth_Hook_Abstract
{
static function run(array $package)
{
if (empty($package) || empty($package['uid'])) {
return;
}
$uid = $package['uid'];
$nickName = empty($package['nick_name']) ? '' : $package['nick_name'];
$gender = 3;
if(!empty($package['gender'])){
switch ($package['gender']) {
case '男':
$gender = 1;
break;
case '女':
$gender = 2;
break;
}
}
QINPassport_Models_Profile_Base_Client::setUserBase($uid, $nickName, '0000-00-00', $gender);
}
}