R
R
Run Utochkin2014-04-29 11:30:20
1C-Bitrix
Run Utochkin, 2014-04-29 11:30:20

Why does Bitrix not authorize the user?

I created my own Bitrix component, but it does not want to authorize the user.
Here is the code:

$login = $USER->Login(htmlspecialchars($_POST['email_auth']), htmlspecialchars($_POST['password_auth']), $_POST['remember']);
if($login) LocalRedirect('/');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander N++, 2014-04-29
@Run

htmlspecialchars are extra for the USER->login function

R
Run Utochkin, 2014-04-29
@Run

Thanks for the solution. Along the way, another question appeared: the manual about this function says that: "The function checks the login and password, and if they are correct, then authorizes the user. If the authorization is successful, then it returns "true", otherwise if the login and password are incorrect, then returns an array with an error for the ShowMessage function. "
Here I am trying to display an error message, but it does not work ((
Please tell me how to call the ShowMessage() function correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question