切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Chrisleung
7 years ago
提交
dcd0a80bd4a95c3d42b7eccfc00ef40a45eb1bbb
1 个父辈
4260ee14
1. 修复api演示模块返回信息文字错误
2. 修复会员模块,修改,激活邮箱,手机号失败问题
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
11 行增加
和
10 行删除
application/admin/command/Install/fastadmin.sql
application/api/controller/User.php
application/admin/command/Install/fastadmin.sql
查看文件 @
dcd0a80
...
...
@@ -424,6 +424,7 @@ CREATE TABLE `fa_user` (
`updatetime`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'更新时间'
,
`token`
varchar
(
50
)
NOT
NULL
DEFAULT
''
COMMENT
'Token'
,
`status`
varchar
(
30
)
NOT
NULL
DEFAULT
''
COMMENT
'状态'
,
`verification`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'验证'
,
PRIMARY
KEY
(
`id`
),
KEY
`username`
(
`username`
),
KEY
`email`
(
`email`
),
...
...
@@ -431,7 +432,7 @@ CREATE TABLE `fa_user` (
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
COMPACT
COMMENT
=
'会员表'
;
BEGIN
;
INSERT
INTO
`fa_user`
VALUES
(
1
,
1
,
'admin'
,
'admin'
,
'c13f62012fd6a8fdf06b3452a94430e5'
,
'rpR6Bv'
,
'admin@163.com'
,
'13888888888'
,
'/assets/img/avatar.png'
,
0
,
0
,
'2017-04-15'
,
''
,
0
,
1
,
1
,
1516170492
,
1516171614
,
'127.0.0.1'
,
0
,
'127.0.0.1'
,
1491461418
,
0
,
1516171614
,
''
,
'normal'
);
INSERT
INTO
`fa_user`
VALUES
(
1
,
1
,
'admin'
,
'admin'
,
'c13f62012fd6a8fdf06b3452a94430e5'
,
'rpR6Bv'
,
'admin@163.com'
,
'13888888888'
,
'/assets/img/avatar.png'
,
0
,
0
,
'2017-04-15'
,
''
,
0
,
1
,
1
,
1516170492
,
1516171614
,
'127.0.0.1'
,
0
,
'127.0.0.1'
,
1491461418
,
0
,
1516171614
,
''
,
'normal'
,
''
);
COMMIT
;
DROP
TABLE
IF
EXISTS
`fa_user_group`
;
...
...
application/api/controller/User.php
查看文件 @
dcd0a80
...
...
@@ -72,11 +72,11 @@ class User extends Api
}
if
(
!
Validate
::
regex
(
$mobile
,
"^1\d
{
10
}
$"
))
{
$this
->
error
(
__
(
'Mobile incorrect'
));
$this
->
error
(
__
(
'Mobile i
s i
ncorrect'
));
}
if
(
!
Sms
::
check
(
$mobile
,
$captcha
,
'mobilelogin'
))
{
$this
->
error
(
__
(
'Captcha i
nvalid
'
));
$this
->
error
(
__
(
'Captcha i
s incorrect
'
));
}
$user
=
\app\common\model\User
::
getByMobile
(
$mobile
);
if
(
$user
)
...
...
@@ -120,11 +120,11 @@ class User extends Api
}
if
(
$email
&&
!
Validate
::
is
(
$email
,
"email"
))
{
$this
->
error
(
__
(
'Email incorrect'
));
$this
->
error
(
__
(
'Email i
s i
ncorrect'
));
}
if
(
$mobile
&&
!
Validate
::
regex
(
$mobile
,
"^1\d
{
10
}
$"
))
{
$this
->
error
(
__
(
'Mobile incorrect'
));
$this
->
error
(
__
(
'Mobile i
s i
ncorrect'
));
}
$ret
=
$this
->
auth
->
register
(
$username
,
$password
,
$email
,
$mobile
,
[]);
if
(
$ret
)
...
...
@@ -190,7 +190,7 @@ class User extends Api
}
if
(
!
Validate
::
is
(
$email
,
"email"
))
{
$this
->
error
(
__
(
'
Mobile
incorrect'
));
$this
->
error
(
__
(
'
Email is
incorrect'
));
}
if
(
\app\common\model\User
::
where
(
'email'
,
$email
)
->
where
(
'id'
,
'<>'
,
$user
->
id
)
->
find
())
{
...
...
@@ -227,7 +227,7 @@ class User extends Api
}
if
(
!
Validate
::
regex
(
$mobile
,
"^1\d
{
10
}
$"
))
{
$this
->
error
(
__
(
'Mobile incorrect'
));
$this
->
error
(
__
(
'Mobile i
s i
ncorrect'
));
}
if
(
\app\common\model\User
::
where
(
'mobile'
,
$mobile
)
->
where
(
'id'
,
'<>'
,
$user
->
id
)
->
find
())
{
...
...
@@ -236,7 +236,7 @@ class User extends Api
$result
=
Sms
::
check
(
$mobile
,
$captcha
,
'changemobile'
);
if
(
!
$result
)
{
$this
->
error
(
__
(
'Captcha i
nvalid
'
));
$this
->
error
(
__
(
'Captcha i
s incorrect
'
));
}
$verification
=
$user
->
verification
;
$verification
->
mobile
=
1
;
...
...
@@ -300,7 +300,7 @@ class User extends Api
}
if
(
$mobile
&&
!
Validate
::
regex
(
$mobile
,
"^1\d
{
10
}
$"
))
{
$this
->
error
(
__
(
'Mobile incorrect'
));
$this
->
error
(
__
(
'Mobile i
s i
ncorrect'
));
}
$user
=
\app\common\model\User
::
getByMobile
(
$mobile
);
if
(
!
$user
)
...
...
@@ -310,7 +310,7 @@ class User extends Api
$ret
=
Sms
::
check
(
$mobile
,
$captcha
,
'resetpwd'
);
if
(
!
$ret
)
{
$this
->
error
(
__
(
'Captcha i
nvalid
'
));
$this
->
error
(
__
(
'Captcha i
s incorrect
'
));
}
Sms
::
flush
(
$mobile
,
'resetpwd'
);
...
...
请
注册
或
登录
后发表评论