M
M
Michael2018-08-29 15:29:35
symfony
Michael, 2018-08-29 15:29:35

How to change the passed username before authorization?

In a symfony project, you need to implement authorization by mail or phone. Before querying the database, you need to bring the phone to the normal form "+79251234567"
So far, this is implemented by a function in the repository that fixes the phone before querying the database.
Maybe there is some way to change the username sent to security by the symfony component?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BI0R0B0T, 2018-08-29
@BI0R0B0T

Try with a custom user provider

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question