An error occurred when logging in with a mobile phone number. After modifying it to this, it can be used. What is the problem
path:\modules\users\actions\login_by_phone.php
Original code:
$user_query = db_query("select id from app_entity_1 where length(field_" . CFG_2STEP_VERIFICATION_USER_PHONE . ")>0 and rukovoditel_regex_replace('[^0-9]','',field_" . CFG_2STEP_VERIFICATION_USER_PHONE . ") = '" . db_input(preg_replace('/\D/', '', $_POST['phone'])) . "'");
Change to:
$user_query = db_query("select id from app_entity_1 where length(field_" . CFG_2STEP_VERIFICATION_USER_PHONE . ")>0 and TRIM(REPLACE(field_" . CFG_2STEP_VERIFICATION_USER_PHONE . ", '[^0-9]', '')) = '" . db_input(preg_replace('/\D/', '', $_POST['phone'])) . "'");
An error occurred when logging in with a mobile phone number
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: An error occurred when logging in with a mobile phone number
rukovoditel_regex_replace function is added automatically to your database when you add filed type phone number.