Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Redirect after Login ( How do I redirect to admin or Agent area) afte login

  1. #1
    Join Date
    May 2005
    Posts
    16

    Default Redirect after Login ( How do I redirect to admin or Agent area) afte login

    after a agent logs in how do I redirect them to the admin or agent area to add a listing?

    Thank You

  2. #2
    Join Date
    Feb 2005
    Posts
    11

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    I wouldn't normally recommend editing core files, but the easiest solution would be to edit line 219 of login.inc.php (v2.3.6) from this
    PHP Code:
    $display .= '<form action="" method="post">'
    to this
    PHP Code:
    $display .= '<form action="admin/" method="post">'
    Otherwise, writing an addon is probably the better option.
    The documentation is your friend.

    ubi mel ibi apes

  3. #3
    Join Date
    Jul 2006
    Posts
    8

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    I have a similar question/problem.

    How would I create a tab or a section so that when a member logs in they would be able to post listings themselves. All I can figure out how to do is to save searches and listings, I want to make it where each visitor can post their own listings.

    Thanks,
    Dave

  4. #4
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    Members cannot post listings. They have to register as agents.

  5. #5
    Join Date
    Feb 2007
    Posts
    46

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    I would also like to know how when to redirect a user to the admin page when they have logged in using the login form on the front of the site.

    Is there a way to forece it to always use the admin login form without having to rip that form and replace it with the one on the front of the site?

  6. #6
    Join Date
    Feb 2007
    Posts
    55

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    I'm working on essentially the same thing right now. The solution I've figured out is to add an "Agent Login" menu option to the front page. Clicking on that brings them to the admin login page. Not exactly what you requested, but a good workaround in my opinion.

    If you're saying you want all your members to have agent powers, just eliminate normal members and replace that with the agent login as described above. You'll also need to add an "Agent Signup" option if you haven't done that already.

    If on the other hand you don't want "agents" per se, simply change the text so that they appear to be "members", but use the agent code.

    Why agents have to be admins in order to add listings is a mystery to me. Why members can't post listings is yet another mystery.

    My guess is you want to accommodate FSBO's, which are for all intents & purposes agents that are selling their own personal properties, not brokering someone else's.

    In my opinion, it would of been simpler for the developer's to just make everyone a member, including admins. Then add on or take off powers according to individual (or group) need. At that point adding in an overlooked group like FSBO would of been a simple matter - well, it would be simple if there were a screen/page to add in new classes/groups of user; right now you probably have to access the database directly. I'd imagine there aren't a whole lot of groups necessary, but this is one group that could easily be added by the developer's if all "users" were "members" and some had special priviledges according to group/class.

    Then again, I'm a newbie, so what do I know?


    Quote Originally Posted by f3nd3r View Post
    I would also like to know how when to redirect a user to the admin page when they have logged in using the login form on the front of the site.

    Is there a way to forece it to always use the admin login form without having to rip that form and replace it with the one on the front of the site?

  7. #7
    Join Date
    Feb 2007
    Posts
    46

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    Thanks for your help. I actually figured out how to do it a couple of days ago.

    It can be easily done by changing the action on the form to
    PHP Code:
    action="http://www.property-profiles.co.uk/admin/index.php" 
    Let me know if this is a better method for you

  8. #8
    Join Date
    Feb 2007
    Posts
    55

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    I suppose it depends on what results you're trying to get. Aren't you going to end up with ALL members being sent to the admin page? If that's what you want, great!

    However, I don't think that works for me. Unless of course I'm misunderstanding something.

    I have all classes of user. I have members, agents, and I will have to somehow add in FSBO members which I haven't yet thought about how to do. And of course I also have an admin.

    If I send plain members to the admin login page, I'm not sure if they'll be able to login. And if they are able, then I think I'll end up having to moderate each user on a case by case basis, changing configuration options for each user according to whether they're really agents or not. I'm not even sure if that's do-able at this point. I don't know the software well enough yet. On the other hand, I suppose it would satisfy the FSBO concern, by making all members FSBO's. I still have more thinking to do on the subject and I'm just not ready to dedicate the time yet.

    Unfortunately, the configuration I described earlier and am using is going to cause confusion among agents, due to the fact that they end up with TWO profiles. One profile allows them to upload images, the other one doesn't. Otherwise, I believe they're identical but I'd have to doublecheck to be sure. Kinda goofy, but I've been so busy with so many other changes I need to make, that I haven't had time to deal with that issue. Essentially as I recall, one profile uses the user_manager function from the agent/admin area, whereas the other profile uses the equivalent member function. I believe they modify the same table in the database but I haven't had time to pursue this issue. Eventually I will probably look into it when I have more time.


    Quote Originally Posted by f3nd3r View Post
    Thanks for your help. I actually figured out how to do it a couple of days ago.

    It can be easily done by changing the action on the form to
    PHP Code:
    action="http://www.property-profiles.co.uk/admin/index.php" 
    Let me know if this is a better method for you

  9. #9
    Join Date
    Feb 2007
    Posts
    46

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    Quote Originally Posted by IhateUserNames View Post
    I suppose it depends on what results you're trying to get. Aren't you going to end up with ALL members being sent to the admin page? If that's what you want, great!

    However, I don't think that works for me. Unless of course I'm misunderstanding something.

    I have all classes of user. I have members, agents, and I will have to somehow add in FSBO members which I haven't yet thought about how to do. And of course I also have an admin.

    If I send plain members to the admin login page, I'm not sure if they'll be able to login. And if they are able, then I think I'll end up having to moderate each user on a case by case basis, changing configuration options for each user according to whether they're really agents or not. I'm not even sure if that's do-able at this point. I don't know the software well enough yet. On the other hand, I suppose it would satisfy the FSBO concern, by making all members FSBO's. I still have more thinking to do on the subject and I'm just not ready to dedicate the time yet.

    Unfortunately, the configuration I described earlier and am using is going to cause confusion among agents, due to the fact that they end up with TWO profiles. One profile allows them to upload images, the other one doesn't. Otherwise, I believe they're identical but I'd have to doublecheck to be sure. Kinda goofy, but I've been so busy with so many other changes I need to make, that I haven't had time to deal with that issue. Essentially as I recall, one profile uses the user_manager function from the agent/admin area, whereas the other profile uses the equivalent member function. I believe they modify the same table in the database but I haven't had time to pursue this issue. Eventually I will probably look into it when I have more time.
    Users, Agents and Admin are all able to log in using the admin login. Users get redirected back to the front page of the site, agents get sent to the Admin control pannel, as does the Admin account. This way works best for me. It's no different than using the standard login URL apart from agents and admin getting redirected to the admin control panel, which is what i was trying to achieve.

  10. #10
    Join Date
    Feb 2007
    Posts
    55

    Default Re: Redirect after Login ( How do I redirect to admin or Agent area) afte login

    Cool. If I had known that I probably would of attempted that configuration first (even though technically we're not supposed to have to touch core files). Since I didn't know that, I did it my way which seems to work fine, except for the double profile issue previously mentioned. But then I assume you have that issue as well - perhaps you haven't noticed it?

    Also, how do/did you differentiate between members and agents at signup time? The signup form doesn't ask if you're an agent. In fact, although the text of the 2 signup forms is identical, whether you're an agent or a member is preordained depending on what path brings you there - by way of the fact that "type" is specified as part of the URL. Seems to me another core file change is required; yes?

    I ended up adding a seperate agent signup to the menu - so now I have 2 extra menu options that I wish I didn't (agent signup & agent login).

    If the developer's had instead put "type" on the signup form (in the form of a question such as "Are you an agent?"), the issue wouldn't exist.


    Quote Originally Posted by f3nd3r View Post
    Users, Agents and Admin are all able to log in using the admin login. Users get redirected back to the front page of the site, agents get sent to the Admin control pannel, as does the Admin account. This way works best for me. It's no different than using the standard login URL apart from agents and admin getting redirected to the admin control panel, which is what i was trying to achieve.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •