Let Ecshop user name, mobile phone number, email login method

Source: Internet
Author: User

Let Ecshop user name, mobile phone number, email login method, only applicable to not do any platform integration of Ecshop website   modified files:  1, includes/modules/integrates/ecshop.php   $this->field_email = ' email ';  add   $this below the code->field_phone = ' Mobile_phone ';  ========== ===========================================================  found    function check_user ($username, $ Password = null)   The following   $sql = "Select". $this->field_id .                    "from". $this->table ($this->user_table) .               ,     "WHERE". $this->field_name. "= '". $post _username. "'";  modified to   $sql = "Select". $this->field_id .                    "from". $this->table ($this->user_table) .               ,     "WHERE". $this->field_name. "= '". $post _username. "' or". $this->field_phone. "= '". $poSt_username. "' or". $this->field_email. "= '". $post _username. "'";   find   $sql = "Select user_id, Password, salt,ec_salt" .            &NBSP ;       "from". $this->table $this->user_table .                    "WHERE User_n Ame= ' $post _username ' ";  modified to   $sql =" Select user_id, Password, salt,ec_salt ".                    "from". $this->table $this->user_table .                    "WHERE User_n Ame= ' $post _username ' or mobile_phone= ' $post _username ' or email= ' $post _username ' ";   2, includes/modules/ integrates/integrate.php  Find the field name of the     /* Member mailbox */    var $field _email    = ";   Add     /* Member phone field name */    var $field _phone    = ';   find function Logi N ($username, $pAssword, $remember = null) The following     if ($this->need_sync)    {          $this->sync ($username, $password);   }  add      $sql = "Select" Above. $this->field_name .                "from". $this->table ($this->user_table) .                "WHERE". $this->field_phone. "= ' $username ' or '. $this->field_name. "= ' $username ' or '. $this->field_email. "= ' $username '";    $username = $this->db->getone ($sql, true);   find function Check_user ($ Username, $password = null) The following      $sql = "Select". $this->field_id .                    "from". $this->table ($this->user_table) .               ,     "WHERE". $this->field_name. "= '". $post _username. "'";  modified to  &nbsp   $sql = "Select". $this->field_id .                    "from". $this->table ($this->user_table) .               ,     "WHERE". $this->field_name. "= '". $post _username. "' or". $this->field_phone. "= '". $post _username. "' or". $this->field_email. "= '". $post _username. "'";   find      $sql = "Select". $this->field_id .                    "from". $this->table ($this->user_table) .               ,     "WHERE". $this->field_name. "= '". $post _username. "' and". $this->field_pass. "= '". $this->compile_password (Array (' password ' = $password)). "'";   modified to      $sql = "Select". $this->field_id .                    "from". $thiS->table ($this->user_table) .               ,     "WHERE (". $this->field_name. "= '". $post _username. "' or". $this->field_phone. "= '". $post _username. "' or". $this->field_email. "= '". $post _username. "') and". $this->field_pass. "= '". $this->compile_password (Array (' password ' = $password)). "'";   find function Sync ($username, $password = ", $md 5password=")   below      $sql = "Select User_name, email, password, sex, birthday ".               " from ". $GLOBALS [' ECS ']->table (' users ') .                ' WHERE user_name = ' $username ' ";  modified to      $sql =" Select user_name, email, password, sex, birthday ".                "from". $GLOBALS [' ECS ']->table (' users ') .                "WHERE user_name = ' $Username ' or mobile_phone = ' $username ' or email = ' $username ' "; 

Let Ecshop user name, mobile phone number, email login method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.