N
N
naneri2014-12-05 20:13:25
OAuth
naneri, 2014-12-05 20:13:25

How to replace Sentry methods with your own in Laravel?

Now I am writing authorization in a Laravel project using the Sentry bundle.
It is necessary to replace the check whether the user is activated with his own method, because I did not use migrations from the package, but created my own table.
Due to the fact that sentry checks the column that it planned to create itself (and I don't have such a column), it constantly throws an error - "user not activated".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gladkovskiy, 2014-12-06
@SMGladkovskiy

Make a service provider based on the Sentry SP, redefine the loaded component there, where the necessary methods are used, with your own, which will extend the required class, and feed this new SP to the system instead of the original one. In your class method, make all the changes and enjoy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question