Answer the question
In order to leave comments, you need to log in
Kohana 3.3 Authorization by email and username, is it possible?
Good day! There is a kohana. 3.3, it has an ORM driver ..
Inherited from previous developers.
It is necessary to make authorization both by email and by username, a seemingly standard action, but I don’t know where to start.
Found the function ORM::factory('User')->unique_key($post['login']); which looks if you entered a login, then it says that this is a login, and if you entered a mail, it shows that it is an email, and in fact I understand that this is the criterion by which you need to judge how to authorize a user. (by login or email, if not right, please tell me.)
Now, after all the definitions with which we will authorize, you need to rewrite the login function somewhere, preserving the user's memory ... the question is where to do this? it is clear that in the Classes/ folder, but where next, in Kohana or Controller?
I've already read a lot, all the links in both Google and Yandex are already visited ... help guys ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question