• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

how to do so that the client and the administrator can log in from the client login interface

Knowledge Base
4
11
765
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O
    Omar last edited by 2 Jul 2020, 11:55

    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

    1 Reply Last reply Reply Quote 0
    • V
      Vaishali Agarwal last edited by 3 Jul 2020, 10:39

      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.

      1 Reply Last reply Reply Quote 0
      • O
        Omar last edited by 3 Jul 2020, 20:48

        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

        1 Reply Last reply Reply Quote 0
        • O
          Omar last edited by 3 Jul 2020, 21:14

          Annotation 2020-07-02 111842.png

          1 Reply Last reply Reply Quote 0
          • R
            rahul last edited by 6 Jul 2020, 14:05

            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.

            1 Reply Last reply Reply Quote 0
            • O
              Omar last edited by 6 Jul 2020, 15:13

              Hello @rahul ,
              I did not understand well, I use the admin or client controller to link the two?
              thank you

              A 1 Reply Last reply 7 Jul 2020, 13:13 Reply Quote 0
              • A
                akhtarkhan @Omar last edited by 7 Jul 2020, 13:13

                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.

                1 Reply Last reply Reply Quote 0
                • O
                  Omar last edited by 7 Jul 2020, 14:27

                  Hello @akhtarkhan,
                  Please I modify the customer’s controller session, it still doesn’t work,
                  Can you tell me what should I change?
                  Annotation 2020-07-07 151842.png Annotation 2020-07-07 151752.png

                  A 1 Reply Last reply 8 Jul 2020, 10:16 Reply Quote 0
                  • A
                    akhtarkhan @Omar last edited by 8 Jul 2020, 10:16

                    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](Screenshot (24).png image url)

                    1 Reply Last reply Reply Quote 0
                    • O
                      Omar last edited by 8 Jul 2020, 13:16

                      Hello @akhtarkhan ,
                      Please, I put the condition where you asked me but its still not working?

                      Annotation 2020-07-08 140723.png

                      1 Reply Last reply Reply Quote 0
                      • O
                        Omar last edited by 11 Jul 2020, 15:39

                        the connection was successful, thanks for your help
                        solution.png

                        1 Reply Last reply Reply Quote 0
                        1 out of 11
                        • First post
                          1/11
                          Last post