月度归档:2017年10月

ucenter

增加邮箱查询用户接口

uc_client\client.php

function uc_get_user_by_email($username) {
$return = call_user_func(UC_API_FUNC, ‘user’, ‘get_user_by_email’, array(‘username’=>$username));
return UC_CONNECT == ‘mysql’ ? $return : uc_unserialize($return);
}

uc_client\control\user.php

function onget_user_by_email() {
$this->init_input();
$username = $this->input(‘username’);
$status = $_ENV[‘user’]->get_user_by_email($username);
if($status) {
return array($status[‘uid’],$status[‘username’],$status[’email’]);
} else {
return 0;
}
}