how to do so that the client and the administrator can log in from the client login interface
-
how to do
so that the client
and the administrator can log in from the client login interface but depending on the credentials entered, the administration dashboard will open or the client dashboard -
hI @Omar
It's possible but it takes lot of customization in the code.Also what if your admin wants to be an client??In this case you will get an trouble.
-
HELLO @Vaishali-Agarwal ,
I just want the client and the admin to connect here, but after the connection the client is redirected to his account and the admin is redirected to the admin dashboard, that's it,
Can you help me?please -
-
Hello @Omar
First of all, you need to make sure that the same Id can not use for both customer and Admin.
Second thing is that when request comes to the controller, you need to distinguish whether it is Admin or controller and according to that use login method as written in both controller. -
Hello @rahul ,
I did not understand well, I use the admin or client controller to link the two?
thank you -
Hello @Omar
You can do this by customizing the code in SessionController which is in Customer package
So According to your need, you can check the role if the login user is admin then you can redirect to the dashboard and if the user is a normal customer, then you can redirect the user anywhere you want. -
Hello @akhtarkhan,
Please I modify the customer’s controller session, it still doesn’t work,
Can you tell me what should I change?
-
Dear @Omar
In second last line you can put you own condition and redirect any where you want.
You can see it in the screenshot .. second last line of the code in the screenshot.![alt text](image url)
-
Hello @akhtarkhan ,
Please, I put the condition where you asked me but its still not working? -
the connection was successful, thanks for your help