Joomla, custom redirection after sign in

When a user signs in in Joomla, he is automatically redirected at homepage.

This article explains you how to add a hack in Joomla 1.5, to redirect the user to the page of your choice after he signed in. It may be useful, especially if you want the user to do a specific action (e.g. : to post an article, a picture, subscribe to your services, etc.). From back-end, you may specify a Joomla! page for redirection, but no custom URL.

I used Joomla 1.5.8 for this example, but it should be the same pattern for every other J1.5.x version.

Open this file :


[votre site]/components/com_user/controller.php

Look for this code line, that should be located at line 163, inside the login() function :

login() :

$mainframe->redirect( $return );

All you have to do is to replace $return by the URL where you want users to be redirected. For instance :

$mainframe->redirect( “http://www.guylabbe.ca” );

Ce message est également disponible en : French

24 thoughts on “Joomla, custom redirection after sign in

  1. bob

    i was happy to find this post…but this does not work when i tried it. I am trying to have user redirect to my custom page and not home page after they register.
    Let me know if you have any suggestions.

  2. Guy Labbé

    Hi, Thanks for you interest! Just type the URL of your custom page instead of current (home) URL, but I guest you may have already tried this :) If it doesn’t work, would you post here your code please so we can have a look at it

  3. j3n

    I tried this but it didn’t work, maybe because i was using a login page instead of login module on the side.

    I solved it by editing index.php – the idea is to detect that it’s a login page and add a base64_encode return url on the current URL. It might be a bit dodgy but it works for me.

    //if the page is login page – find out ur query string by ‘echo’ it
    if($_SERVER['QUERY_STRING'] == ‘option=com_user&view=login&Itemid=21′){

    //this is where you want to redirect user
    $returnURL = base64_encode(‘index.php/component/ezrealty/?controller=properties&task=add’);

    //using js redirect to add your default ‘return url’
    echo ““;
    }

    If you have the same problem, hopefully it would help :-)

  4. LeviUpetdpnjd

    Do your due diligence, self-evaluation, and fillers. Tell that to feel good about yourself and manage your personal schedule. The leader recognizes that people who do this for a start-up money business. Apart these you can host your own entrepreneurial strengths and weaknesses, opportunities and taking the time they are trying to BS your way.

  5. BlaineCleveland

    Using about 10 moments of your energy and a little support from LogMeIn you’re able to arrange your personal computer to be seen from any internet connection. claimed Kik reached an amount for Weinstein

  6. MosesX26cx

    This is really attention-grabbing, You are an excessively skilled blogger. I have joined your rss feed and look forward to searching for extra of your great post. Also, I have shared your web site in my social networks

  7. Clement1628

    As a teen, I knew little and did not understand the serious nature of all that was going on. Foreigners actually aspire to learn Swahili and master this language considering the fact that it is not much widely spoken today. Ultimately, learning to speak Spanish can be VERY time consuming or it can be a simple 1-2-3 system.

  8. RockyMFBznecy

    Other disorders such as herpetic whitlow, herpes gladiatorum, ocular herpes, cerebral herpes infection encephalitis, neonatal herpes, and possibly Bell’s palsy are all caused by HSV. This discovery can be very helpful to doctors as they work towards finding a cure for Alzheimer’s disease. Those who are concerned about the radiation exposure should talk to their doctor prior to have this scan done to address their concerns.

  9. ElviraX09wpvhkip

    Prevention of further complications stemming from thyroid disease like heart or circulatory problems, diabetes or even stroke can come from changing eating and exercise patterns, so the investment pays off in better health over the long term. One of the negative results of this is bloating, gas, and indigestion. I’d recommend that you try this medication, but if you find that it is not working, I’d recommend that you try Low-dose Naltrexone.

  10. DeanneLuevano

    You should also consider whether you learn best through repetition or open inquiry. These immigrants are mostly French speaking and require, in order to integrate better into society and to find work, an English school. This shows how technological advancement has help people in learning though classic methods can nevertheless be dominant up to this generation.

  11. UlyssesDettmann

    Appreciating the hard work you put into your website and detailed information you provide. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Wonderful read! I’ve saved your site and I’m including your RSS feeds to my Google account.

  12. AdolfoRosen

    Consider mastopexy surgery with best breast doctor in Sydney if you want to enhance the look of your breasts. I’ve never seen an episode of “Sex and the City” or “Ugly Betty” or “America’s Next Top Model” or “Project Runway. And at the end of the third month or so, I noticed my bra felt somewhat tighter.

  13. MilesBidencope

    Amazing and delicious Raw vegan recipes for desserts, entrees, soups, salads, sides, snacks, smoothies, juicing, holidays, dehydrating, hemp, and tips for applying the vegan Raw meal lifestyle. Again, these portion are more for people who are dieting. It is imperative that you would get a little tired of the same paleo diet recipes at some point of time.

  14. MohammaSpillman

    The home cures that can assist you remove Bacterial vaginosis infection are:. Remedy frequently consists of medications such as metronidzole or clindamyrin. Our world is full of a lot more quick bacterial vaginosis cures that you can use from home.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>