Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
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
zhangjun
User
Commits
8bf11ed4
Commit
8bf11ed4
authored
Jul 07, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
6ad54a78
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
8 deletions
+47
-8
constants.php
esf_core/config/constants.php
+2
-0
user_model.php
esf_core/models/user_model.php
+45
-8
No files found.
esf_core/config/constants.php
View file @
8bf11ed4
...
@@ -397,6 +397,8 @@ define('GB_GET_USER_INFO_BY_USER_ID_URL', 'http://newrenttest.house365.com/api/t
...
@@ -397,6 +397,8 @@ define('GB_GET_USER_INFO_BY_USER_ID_URL', 'http://newrenttest.house365.com/api/t
define
(
'GB_GET_USER_INFO_BY_SSO_URL'
,
'http://ucentertest.house365.com/index/user/info'
);
define
(
'GB_GET_USER_INFO_BY_SSO_URL'
,
'http://ucentertest.house365.com/index/user/info'
);
// 基于个人用户ID更新用户数据接口地址
// 基于个人用户ID更新用户数据接口地址
define
(
'GB_UPDATE_USER_INFO_BY_USER_ID_URL'
,
'http://newrenttest.house365.com/api/tf-app/update-personal-info'
);
define
(
'GB_UPDATE_USER_INFO_BY_USER_ID_URL'
,
'http://newrenttest.house365.com/api/tf-app/update-personal-info'
);
// 基于手机号获取用户数据接口地址
define
(
'GB_GET_USER_INFO_BY_PHONE_URL'
,
'http://newrent.house365.com/api/tf-app/get-user-info-by-phone'
);
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
...
...
esf_core/models/user_model.php
View file @
8bf11ed4
...
@@ -646,19 +646,54 @@ class User_model extends MY_Model
...
@@ -646,19 +646,54 @@ class User_model extends MY_Model
* @param type $uid
* @param type $uid
* @return string
* @return string
*/
*/
// function yztelno($telno)
// {
// $user_id = $this->get_data(array('form_name' => 'personal_user','limit'=>1,'where'=>array('telno'=>$telno,'is_use'=>1),'select'=>array('id')),'esf');
//
// if(!empty($user_id[0]['id']))
// {
// return $user_id[0]['id'];
// }else{
// return 0;
// }
// }
/**
* 验证是否该用户已注册过手机号
* @param int $uid
* @return string
*/
function
yztelno
(
$telno
)
function
yztelno
(
$telno
)
{
{
$user_id
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'telno'
=>
$telno
,
'is_use'
=>
1
),
'select'
=>
array
(
'id'
)),
'esf'
);
$url
=
GB_GET_USER_INFO_BY_PHONE_URL
.
'?telno='
.
$telno
;
$userRes
=
curl_get_contents
(
$url
);
if
(
!
empty
(
$user_id
[
0
][
'id'
]))
$userRes
=
!
empty
(
$userRes
)
?
json_decode
(
$userRes
,
1
)
:
array
();
$userInfo
=
isset
(
$userRes
[
'data'
]
)
?
$userRes
[
'data'
]
:
array
();
if
(
isset
(
$userInfo
[
'id'
])
&&
!
empty
(
$userInfo
[
'id'
]))
{
{
return
$user_id
[
0
]
[
'id'
];
return
$userInfo
[
'id'
];
}
else
{
}
else
{
return
0
;
return
0
;
}
}
}
}
// /**
// * 验证是否该用户已注册过手机号,论坛用户绑定手机专用
// * @param type $uid
// * @return string
// */
// function yztelnolt($telno)
// {
// $user_id = $this->get_data(array('form_name' => 'personal_user','limit'=>1,'where'=>array('telno'=>$telno,'is_use'=>1),'select'=>array('id','infofrom')),'esfbak');
//
// if(!empty($user_id))
// {
// return $user_id;
// }else{
// return 0;
// }
// }
/**
/**
* 验证是否该用户已注册过手机号,论坛用户绑定手机专用
* 验证是否该用户已注册过手机号,论坛用户绑定手机专用
* @param type $uid
* @param type $uid
...
@@ -666,11 +701,13 @@ class User_model extends MY_Model
...
@@ -666,11 +701,13 @@ class User_model extends MY_Model
*/
*/
function
yztelnolt
(
$telno
)
function
yztelnolt
(
$telno
)
{
{
$user_id
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'telno'
=>
$telno
,
'is_use'
=>
1
),
'select'
=>
array
(
'id'
,
'infofrom'
)),
'esfbak'
);
$url
=
GB_GET_USER_INFO_BY_PHONE_URL
.
'?telno='
.
$telno
;
$userRes
=
curl_get_contents
(
$url
);
if
(
!
empty
(
$user_id
))
$userRes
=
!
empty
(
$userRes
)
?
json_decode
(
$userRes
,
1
)
:
array
();
$userInfo
[
0
]
=
isset
(
$userRes
[
'data'
]
)
?
$userRes
[
'data'
]
:
array
();
if
(
isset
(
$userInfo
[
0
][
'id'
])
&&
!
empty
(
$userInfo
[
0
][
'id'
]))
{
{
return
$user_id
;
return
$userInfo
[
0
]
;
}
else
{
}
else
{
return
0
;
return
0
;
}
}
...
...
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