Home > Backend Development > PHP Tutorial > Discuz X32 enables mobile phone number login

Discuz X32 enables mobile phone number login

WBOY
Release: 2016-07-28 08:27:30
Original
1323 people have browsed it

1. It is very simple to implement mobile phone number login

Add mobile fields to the pre_common_member and pre_ucenter_members tables

I found that the login call is the uc_user_login interface method of UC. This method is in the uc_client/client.php file,

then track it , find the onlogin() method in the controller folder uc_client/control/user.php,

Continue to track and find the get_user_by_username method in the model file uc_client/model/user.php, and modify

$arr = $this->db->fetch_first("SELECT * FROM ".UC_DBTABLEPRE."members WHERE username='$username' ");
Copy after login
to:
$arr = $this->db->fetch_first("SELECT * FROM ".UC_DBTABLEPRE."members WHERE username='$username' or mobile='$username'");
Copy after login

Done! ! !

The above introduces the implementation of mobile phone number login with Discuz X32, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template