Results 1 to 10 of 11

Thread: redirect after login

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    56

    Default redirect after login

    I would like to redirect when agents and admins login to the welcome page as a logged in user. I think i need to edit this code:

    if ($type == 'admin') {
    header('Location:' . $config['baseurl'] . '/admin/');
    }else {
    header('Location:' . $config['baseurl'] . '/index.php');
    }
    die();

    from login.inc.php but i tried taking out the /admin and the index.php but it still drops the user on the admin page after login. Can someone help?

    I previously requested this info but didn't realize it was a core change so now I am putting this in the sandbox. Thanks in advance.

    I am only using one user type which is agent (no members) and i added an "add listing" link to my welcome page so i don't want people to start on the admin page when they login.

  2. #2
    Join Date
    Nov 2009
    Posts
    56

    Default Re: redirect after login

    I tried to use the Loginredirect addon but when you click on the link and see the place to register or login and try to click on a field it kicks me to site not found page. The instructions say to edit css accordingly but i'm too new to understand what that means. Here is a link to the page.



    Help please. when you click on register/login in the middle after you click on a field you get an error message.
    Last edited by katzbm; 11-17-2009 at 07:43 PM. Reason: removed link

  3. #3
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: redirect after login

    Quote Originally Posted by katzbm View Post
    I would like to redirect when agents and admins login to the welcome page as a logged in user.
    That's how Open-Realty is by default.

    At frontend, if an Agent log in, he is redirected to the Welcome page as a logged user. The same for Admin.

    If the log in occurs at backend, they stay at backend. Is this is your request???
    If yes, just don't put a link for the backend log in.
    The default "LAZULI" Site Template works this way.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  4. #4
    Join Date
    Nov 2009
    Posts
    56

    Default Re: redirect after login

    I am trying to add a frontend login using loginredirect addon but having problems


    When you try to click on a field you get an error message like page not found,

  5. #5
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: redirect after login

    Quote Originally Posted by katzbm View Post
    I am trying to add a frontend login using loginredirect addon...
    I have no idea wich add-on is that. Where you found it?

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  6. #6
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: redirect after login

    Quote Originally Posted by katzbm View Post
    I am trying to add a frontend login using loginredirect addon but having problems
    http://clearedneighbors.com/realtor/index.php
    When you try to click on a field you get an error message like page not found,
    You didn't read my post...
    The link you have is:
    <a href="http://clearedneighbors.com/realtor/admin/index.php" title="Login">Login</a>
    Change it to:
    <a href="{url_member_login}" title="Login">Login</a>
    And you get what you wish. No need to have an add-on or core file changes.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  7. #7
    Join Date
    Nov 2009
    Posts
    56

    Default Re: redirect after login

    Sorry, where do I make that change? Is it in my login.php or on my main page?

    The addon i was trying to use was

    http://support.open-realty.org/showt...=loginregister

  8. #8
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: redirect after login

    Quote Originally Posted by katzbm View Post
    Sorry, where do I make that change? Is it in my login.php or on my main page?
    At this file:
    http://clearedneighbors.com/realtor/...alty/main.html
    You have:
    HTML Code:
    <a href="{url_agent_login}" title="Login">Login</a>
    Change to:
    HTML Code:
    <a href="{url_member_login}" title="Login">Login</a>

    Quote Originally Posted by katzbm View Post
    This is the "loginregister" add-on and not "Loginredirect" as you wrote.

    As I said, you don't need an add-on, you don't need to modify core files.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  9. #9
    Join Date
    Jan 2009
    Posts
    34

    Default Re: redirect after login

    I see you clarified the question within this post as compared to your other question in the templates section, glad you found your answer though. And the core mod I did for you is of course excessive now that I read your clarified post here. - Jay

  10. #10
    Join Date
    Dec 2009
    Posts
    11

    Default Re: redirect after login

    Can anyone tell me where in the core I can change the page where you are redirected to after registering a new account?

Similar Threads

  1. url redirect
    By eXinRex in forum General Help (CLOSED)
    Replies: 5
    Last Post: 11-16-2007, 10:43 PM
  2. logout redirect
    By 2let2sell2buy in forum Installation/Configuration Help (CLOSED)
    Replies: 1
    Last Post: 10-06-2007, 04:06 PM
  3. Replies: 20
    Last Post: 03-11-2007, 01:45 PM
  4. Login redirect
    By timeforsmilin in forum Installation/Configuration Help (CLOSED)
    Replies: 0
    Last Post: 05-26-2005, 01:44 PM
  5. redirect with cookies
    By laurenced in forum HELP (CLOSED)
    Replies: 2
    Last Post: 03-17-2005, 01:42 PM

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
  •