Results 1 to 4 of 4

Thread: Redirect User after logout?

  1. #1
    macscr is offline Sugar Community Member
    Join Date
    Sep 2005
    Posts
    104

    Default Redirect User after logout?

    Is it possible to be able to redirect the user to a particular url after logout?

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Redirect User after logout?

    Hi macscr

    I believe there are non upgrade safe way to do this, but it is right possible.
    Take a look at the file modules/Users/Logout.php

    PHP Code:
    LogicHook::initialize();
    $GLOBALS['logic_hook']->call_custom_logic('Users''after_logout');
    // go to the login screen.
    header("Location: index.php?action=Login&module=Users"); 
    You can modify the redirect link accordingly to your needs.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Redirect User after logout?

    I'm thinkingggggggg.....an after_logout custom hook could do this very upgrade safe.
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Redirect User after logout?

    Hi SugarDev.net

    Perhaps it can work.
    I had never tried this before.
    It is necessary to make sure you will redirect inside the logic_hook itself to void the modules/Users/Logout.php redirect it.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 2008-03-31, 12:25 PM
  2. Replies: 0
    Last Post: 2008-03-04, 05:22 PM
  3. MySQL error 1054: Unknown column 'user' HELP!
    By tj@estreet.com in forum Help
    Replies: 2
    Last Post: 2007-06-27, 05:44 AM
  4. Email and user setup confusion
    By Buckie in forum Help
    Replies: 1
    Last Post: 2006-01-18, 05:41 PM
  5. Cannot Login
    By Dillon in forum Help
    Replies: 16
    Last Post: 2004-10-13, 02:52 AM

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
  •