Let Ecshop user name, mobile phone number, email login method, only for the Ecshop site that has not done any platform integration
Modified files: 1, includes/modules/integrates/ecshop.php $this->field_email = ' email '; added below the code $this->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) under if ($this->need_sync) { $this->sync ($username, $password); & nbsp;} 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