Toggle navigation
Toggle navigation
This project
Loading...
Sign in
web
/
sso
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
於志远
9 years ago
Commit
a042014a655c4e70be8e9f9b95d2567c9c9e3f33
1 parent
2d3452a9
sso日志、配置开关
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
config/Defines.class.php
controller/Login.class.php
config/Defines.class.php
View file @
a042014
...
...
@@ -62,6 +62,8 @@ class Config_Defines
define
(
'SITE_SQLMAP_DIR'
,
$dir
.
'/sqlmap'
);
// 配置目录
define
(
'SITE_CONFIG_PATH'
,
$dir
.
'/config/core/'
);
// 是否开启日志
define
(
'SSO_LOG'
,
true
);
}
/**
...
...
controller/Login.class.php
View file @
a042014
...
...
@@ -39,7 +39,9 @@ class Controller_Login extends Controller_Abstract
}
return
$this
->
returnJson
(
$result
[
'code'
],
$data
,
$result
[
'message'
]);
}
else
{
file_put_contents
(
'/tmp/sso-'
.
date
(
'Y-m-d'
)
.
'.log'
,
'登录错误['
.
date
(
'H:i:s'
)
.
']-账户:'
.
$account
.
' 密码:'
.
$password
.
' 地区码:'
.
$area
.
"
\n
"
,
FILE_APPEND
);
if
(
defined
(
'SSO_LOG'
)
&&
SSO_LOG
){
file_put_contents
(
'/tmp/sso/login-'
.
date
(
'Y-m-d'
)
.
'.log'
,
'登录错误['
.
date
(
'H:i:s'
)
.
']-账户:'
.
$account
.
' 密码:'
.
$password
.
' 地区码:'
.
$area
.
"
\n
"
,
FILE_APPEND
);
}
}
return
$this
->
returnJson
(
$result
[
'code'
],
array
(),
$result
[
'message'
]);
}
...
...
Please
register
or
login
to post a comment