Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
42633065
Commit
42633065
authored
Apr 24, 2018
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除 ClientUser
parent
90aa42b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
131 deletions
+0
-131
ClientUser.php
e/extend/ibanshou/ClientUser.php
+0
-130
cas.php
e/member/cas.php
+0
-1
No files found.
e/extend/ibanshou/ClientUser.php
deleted
100644 → 0
View file @
90aa42b1
<?php
require
ECMS_PATH
.
"e/extend/ibanshou/ClientCore.php"
;
/**
* Class ClientCore
* 用户信息相关接口
*
* 1. 用户登录, 流程:
* 子系统登录, 点击登录重定向到用户中登录:
* 失败: 继续登录流程
* 成功: 返回到子系统的CAS客户端, 通过用户名/用户id获取用户信息, 检查子系统是否该用户:
* 有: 子系统登录成功;
* 否: 保持用户信息到子系统中, 登录成功;
*
*
* 2. 更新用户信息, 更新系统与用户中心B的公共字段
* 备注:
* 多系统同步:
* 子系统设置计划任务, 根据用户中心与子系统的更新时间字段判断是否更新数据
*
*
* 3. 添加/注册用户
* 子系统注册, 点击注册重定向的用户中心注册:
* 失败: 继续注册流程
* 成功: 跳转到用户中心登录页面
*
*/
class
ClientUser
extends
ClientCore
{
/**
* cas 登录后流程
* @param $wxhuid
* @return bool
*/
public
function
cas
(
$wxhuid
)
{
return
$this
->
HanderResult
(
$this
->
Hander
([
'wxhuid'
=>
$wxhuid
],
'cas'
));
}
/**
* 修改用户信息
* @param $wxhuid
* @param $data
* @return array
*
* data example:
* [
* 'nickname' => '', //昵称
* 'password' => '', //密码
* 'mobile' => '', //手机
* 'mail' => '', //邮箱
* 'avatar' => '', //头像
* 'wx_openid' => '', //微信openid
* ]
*/
public
function
update
(
$wxhuid
,
$data
)
{
if
(
array_key_exists
(
'wxhuid'
,
$data
))
{
unset
(
$data
[
'wxhuid'
]);
}
return
$this
->
HanderResult
(
$this
->
Hander
([
'wxhuid'
=>
$wxhuid
,
'data'
=>
json_encode
(
$data
)],
'update-user'
));
}
/**
* 修改用户密码
* @param $wxhuid
* @param $password
* @param $newPassword
* @return array|bool|mixed
*/
public
function
updatePassword
(
$wxhuid
,
$password
,
$newPassword
)
{
return
$this
->
HanderResult
(
$this
->
Hander
([
'wxhuid'
=>
$wxhuid
,
'password'
=>
$password
,
'newPassword'
=>
$newPassword
],
'update-password'
));
}
/**
* @param $users
* @return array|bool|mixed
*
* users example:
* [
* [
* 'username' => '',
* 'password' => '',
* 'mobile' => '',
* 'nickname' => '',
* 'mail' => '',
* 'avatar' => '',
* ],
* ...
* ]
*/
public
function
syncuser
(
$users
)
{
return
$this
->
HanderResult
(
$this
->
Hander
([
'users'
=>
json_encode
(
$users
)],
'sync-user'
));
}
/**
* 获取微信accessToken
* @return array|bool|mixed
*/
public
function
wxAccessToken
()
{
return
$this
->
HanderResult
(
$this
->
Hander
([],
'wx-access-token'
));
}
/**
* 获取微信openid
* @param $openidToken
* @return array|bool|mixed
*/
public
function
wxOpenid
(
$openidToken
)
{
return
$this
->
HanderResult
(
$this
->
Hander
([
'openidToken'
=>
$openidToken
],
'wx-openid'
));
}
/**
* 获取微信用户信息
* @param $openid
* @return array|bool|mixed
*/
public
function
wxUserInfo
(
$openid
)
{
return
$this
->
HanderResult
(
$this
->
Hander
([
'openid'
=>
$openid
],
'wx-user-info'
));
}
}
\ No newline at end of file
e/member/cas.php
View file @
42633065
...
@@ -5,7 +5,6 @@ require '../class/db_sql.php';
...
@@ -5,7 +5,6 @@ require '../class/db_sql.php';
require
'class/user.php'
;
require
'class/user.php'
;
require
'../class/q_functions.php'
;
require
'../class/q_functions.php'
;
require
"../extend/ibanshou/ClientUser.php"
;
$link
=
db_connect
();
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$empire
=
new
mysqlquery
();
...
...
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