|
|
|
@ -102,7 +102,7 @@ class UcenterMemberModel extends Model{
|
|
|
|
|
* @param string $mobile 用户手机号码
|
|
|
|
|
* @return integer 注册成功-用户信息,注册失败-错误编号
|
|
|
|
|
*/
|
|
|
|
|
public function register($username, $password, $email,$second_pwd,$mobile){
|
|
|
|
|
public function register($username, $password, $email, $second_pwd,$mobile){
|
|
|
|
|
$data = array(
|
|
|
|
|
'username' => $username,
|
|
|
|
|
'password' => $password,
|
|
|
|
@ -110,11 +110,13 @@ class UcenterMemberModel extends Model{
|
|
|
|
|
'email' => $email,
|
|
|
|
|
'mobile' => $mobile,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//验证手机
|
|
|
|
|
if(empty($data['mobile'])) unset($data['mobile']);
|
|
|
|
|
/* 添加用户 */
|
|
|
|
|
if($data = $this->create($data)){
|
|
|
|
|
$data['username'] = $username;
|
|
|
|
|
$data['email'] = $email;
|
|
|
|
|
$status = M('UcenterMember', 'sys_')->data($data)->add();
|
|
|
|
|
$uid = 0;
|
|
|
|
|
if ($status) {
|
|
|
|
|