找到phpsso_server/phpcms/modules/phpsso/index.php
注释掉第54行对邮箱的验证
//$checkemail = $this->checkemail(1);
在下面的switch语句里添加如下分支
case '-7'://自定义手机已经注册
exit('-5');
break;
找到phpcms/modules/memeber/index.php
修改以下
//$userinfo['email'] = (isset($_POST['email']) && is_email($_POST['email'])) ? $_POST['email'] : exit('0');
为
$userinfo['email'] = isset($_POST['email']) ? $_POST['email'] : exit('0');
注意隔一行有一行一模一样的,应该是bug,注释掉
再在下方的insert数据库语句之前添加如下代码
if(!is_email($userinfo['email'])){
$userinfo['mobile']=$userinfo['email'];
$userinfo['email']='';
}
找到phpcms/modules/memeber/classes/client.class.php里的ps_member_register()方法
注释掉邮箱验证
// if(!$this->_is_email($email)) {
// return -3;
// }
下面$data里修改
'email' => $this->email,
为
is_email($this->email)?'email':'mobile' => $this->email,//注 v9_sso_member表里需要添加mobile字段
最后找到phpsso_server/phpcms/modules/phpsso/classes/phpsso.class.php
把
//if(isset($this->data['email']) && $this->data['email']!='' && is_email($this->data['email'])==false){
改成
if(isset($this->data['email']) && $this->data['email']=='' ){
其余UCenter的client的修改见
http://blog.csdn.net/fyzhu01/article/details/70666712