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.
    • V
      Vaishali Agarwal last edited by

      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

        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

          Annotation 2020-07-02 111842.png

          1 Reply Last reply Reply Quote 0
          • R
            rahul last edited by

            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

              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 Reply Quote 0
              • A
                akhtarkhan @Omar last edited by

                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

                  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 Reply Quote 0
                  • A
                    akhtarkhan @Omar last edited by

                    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

                      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

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

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post