Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
6966a8d1
Commit
6966a8d1
authored
Oct 19, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
9a08d47a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Member.php
application/models/DAO/Member.php
+4
-1
application.ini
conf/application.ini
+3
-0
No files found.
application/models/DAO/Member.php
View file @
6966a8d1
...
@@ -71,10 +71,13 @@ class MemberModel extends \DAO\AbstractModel
...
@@ -71,10 +71,13 @@ class MemberModel extends \DAO\AbstractModel
$where
[
NameConst
::
memberMobile
]
=
$mobile
;
$where
[
NameConst
::
memberMobile
]
=
$mobile
;
$addKey
=
Common
::
getConfig
(
'password.key'
);
$addKey
=
Common
::
getConfig
(
'password.key'
);
if
(
!
empty
(
$addKey
)){
if
(
!
empty
(
$addKey
)){
$where
[
NameConst
::
memberPasswd
]
=
Common
::
format
(
"MD5(CONCAT(member_time,member_passwd,'
{
0
}
'))"
,
$addKey
);
$where
=
''
;
$where
=
Common
::
format
(
"(member_mobile = '
{
0
}
') AND (member_passwd = MD5(CONCAT(member_time,'
{
1}','{2
}
')))"
,
$mobile
,
$password
,
$addKey
);
// $where[NameConst::memberPasswd] = Common::format("MD5(CONCAT(member_time,member_passwd,'{0}'))",$addKey);
}
else
{
}
else
{
$where
[
NameConst
::
memberPasswd
]
=
md5
(
$password
);
$where
[
NameConst
::
memberPasswd
]
=
md5
(
$password
);
}
}
$result
=
$this
->
db
->
select
(
$this
->
availMemberColumn
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchOne
();
$result
=
$this
->
db
->
select
(
$this
->
availMemberColumn
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchOne
();
if
(
$result
)
{
if
(
$result
)
{
$memberAvatarUrl
=
$this
->
getMemberAvatarUrl
(
$result
[
'member_id'
],
$result
[
'member_avatar'
]);
$memberAvatarUrl
=
$this
->
getMemberAvatarUrl
(
$result
[
'member_id'
],
$result
[
'member_avatar'
]);
...
...
conf/application.ini
View file @
6966a8d1
...
@@ -117,6 +117,7 @@ resources.database.params.password = "!@#$%12345werty"
...
@@ -117,6 +117,7 @@ resources.database.params.password = "!@#$%12345werty"
resources.database.params.charset
=
"UTF8"
resources.database.params.charset
=
"UTF8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
; 从库配置
; 从库配置
resources.database.slave.params.driver
=
"pdo_mysql"
resources.database.slave.params.driver
=
"pdo_mysql"
resources.database.slave.params.hostname
=
"127.0.0.1"
resources.database.slave.params.hostname
=
"127.0.0.1"
...
@@ -143,6 +144,8 @@ redis.database.params.prefix = "qm_"
...
@@ -143,6 +144,8 @@ redis.database.params.prefix = "qm_"
redis.database.params.password
=
"23456ertyu"
redis.database.params.password
=
"23456ertyu"
out.config
=
"/data/config"
out.config
=
"/data/config"
;password.key='~!@#$`1234qwertasdfgzxcvb';
; 锁文件
; 锁文件
out.locks
=
"/data/locks"
;
out.locks
=
"/data/locks"
;
; redis配置
; redis配置
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment