FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
weworkapi_php/api/datastructure/Oauth.class.php at master · EternalSuno/weworkapi_php · GitHub
EternalSuno
/
weworkapi_php
Public
forked from
sbzhu/weworkapi_php
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
weworkapi_php
/
api
/
datastructure
/
Oauth.class.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (44 loc) · 1.77 KB
Breadcrumbs
weworkapi_php
/
api
/
datastructure
/
Oauth.class.php
Copy path
File metadata and controls
53 lines (44 loc) · 1.77 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
include_once
(
__DIR__
.
"
/../../utils/Utils.class.php
"
);
class
UserInfoByCode
{
public
$
UserId
=
null
;
// string
public
$
DeviceId
=
null
;
// string
public
$
user_ticket
=
null
;
// string
public
$
expires_in
=
null
;
// uint
public
$
OpenId
=
null
;
// string
static
public
function
Array2UserInfoByCode
(
$
arr
)
{
$
info
=
new
UserInfoByCode
();
$
info
->
UserId
= Utils::
arrayGet
(
$
arr
,
"
UserId
"
);
$
info
->
DeviceId
= Utils::
arrayGet
(
$
arr
,
"
DeviceId
"
);
$
info
->
user_ticket
= Utils::
arrayGet
(
$
arr
,
"
user_ticket
"
);
$
info
->
expires_in
= Utils::
arrayGet
(
$
arr
,
"
expires_in
"
);
$
info
->
OpenId
= Utils::
arrayGet
(
$
arr
,
"
OpenId
"
);
return
$
info
;
}
}
class
UserDetailByUserTicket
{
public
$
userid
=
null
;
// string
public
$
name
=
null
;
// string
public
$
department
=
null
;
// uint array
public
$
position
=
null
;
// string
public
$
mobile
=
null
;
// string, 成员手机号,仅在用户同意snsapi_privateinfo授权时返回
public
$
gender
=
null
;
// uint, 性别。0表示未定义,1表示男性,2表示女性
public
$
email
=
null
;
// string
public
$
avatar
=
null
;
// string, 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可
static
public
function
Array2UserDetailByUserTicket
(
$
arr
)
{
$
info
=
null
;
$
info
->
userid
= Utils::
arrayGet
(
$
arr
,
"
userid
"
);
$
info
->
name
= Utils::
arrayGet
(
$
arr
,
"
name
"
);
$
info
->
department
= Utils::
arrayGet
(
$
arr
,
"
department
"
);
$
info
->
position
= Utils::
arrayGet
(
$
arr
,
"
position
"
);
$
info
->
mobile
= Utils::
arrayGet
(
$
arr
,
"
mobile
"
);
$
info
->
gender
= Utils::
arrayGet
(
$
arr
,
"
gender
"
);
$
info
->
email
= Utils::
arrayGet
(
$
arr
,
"
email
"
);
$
info
->
avatar
= Utils::
arrayGet
(
$
arr
,
"
avatar
"
);
return
$
info
;
}
}
Back
|
FazBrowse Home
|
New Git URL