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   $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