Page 3 of 5

Re: User Specific Login Redirect

Posted: Wed Nov 18, 2009 5:12 pm
by forum-wawa
Fantastic hack. Thanks a million.

One question ( a tiny problem) though.
Presently when a user clicks away from the page to which he was redirected he must logout and then login again to get back to said page. I'd like to have a link, preferably somewhere in the user menu, to this page.

Can someone help with this? Much appreciated

Re: User Specific Login Redirect

Posted: Tue Nov 24, 2009 4:44 pm
by protheist
So the solution originally posted by Sraj49 worked beautifully for me. However I have only one question. Is there a way to make a menu link that would take the logged in user to their specified redirection page?

For example, when User 'ABC123' logged in, their unique redirected url is abc123.html, but also when they click on the menu link "User Home" it would also take them back to that same url. But if the User 'DEF456' logged in, their unique redirected url is DEF456.html, but when they click on the menu link "User Home," it would take them back to their url.

Sorry for the lame example, I just wanna make sure what I am asking is understood. Thanks for any help!

Re: User Specific Login Redirect

Posted: Tue Nov 24, 2009 4:51 pm
by ooffick
You could add a small module to add a link like that.

Olaf

Re: User Specific Login Redirect

Posted: Tue Nov 24, 2009 5:16 pm
by protheist
That's what I am trying to figure out. What that url would look like that would pull up that user's specific redirection page.

Re: User Specific Login Redirect

Posted: Tue Nov 24, 2009 5:26 pm
by ooffick
You would need to create a new module to add this link.

Olaf

Re: User Specific Login Redirect

Posted: Sun Nov 29, 2009 12:10 am
by Sparky9292
ooffick wrote:You would need to create a new module to add this link.

Olaf
How do you get a module to display for a specific user only? ??? The access levels in Joomla are too general. You only get the choices of Public, Registered or Special. There's no list of users that you can pick from.

Re: User Specific Login Redirect

Posted: Sun Nov 29, 2009 12:18 am
by Sparky9292
protheist wrote:So the solution originally posted by Sraj49 worked beautifully for me. However I have only one question. Is there a way to make a menu link that would take the logged in user to their specified redirection page?

For example, when User 'ABC123' logged in, their unique redirected url is abc123.html, but also when they click on the menu link "User Home" it would also take them back to that same url. But if the User 'DEF456' logged in, their unique redirected url is DEF456.html, but when they click on the menu link "User Home," it would take them back to their url.

Sorry for the lame example, I just wanna make sure what I am asking is understood. Thanks for any help!
The only way I can think of doing is this is to create a module for each of your users and then add the specific link in each Custom HTML module. Then use something like MetaMod (http://www.metamodpro.com/) extension to control when this module shows.

Seems like a "jank" way of doing this.

Re: User Specific Login Redirect

Posted: Mon Nov 30, 2009 10:02 am
by ooffick
If you don't like MetaMod, you will need to develop you own small little module.

Olaf

Re: User Specific Login Redirect

Posted: Tue Jan 12, 2010 9:15 am
by kskamalakumar
Hi,
any one help me to set redirection for first time users after successful registration. I am using joomla 1.5.10. I want to set redirect only for the first time users to invite friends page.

Kamal.

Re: User Specific Login Redirect

Posted: Tue Jan 12, 2010 2:31 pm
by ooffick
kskamalakumar wrote:Hi,
any one help me to set redirection for first time users after successful registration. I am using joomla 1.5.10. I want to set redirect only for the first time users to invite friends page.

Kamal.
First, I would recommend to update to 1.5.15

Olaf

Re: User Specific Login Redirect

Posted: Tue Feb 09, 2010 11:07 am
by wadesigns
JoshuaLewis wrote:I used Qwomg's instructions to set this up in Joomla! 1.5.9 and it seems to be working. I still need to do some more testing though.

components/com_user/controller.php appears to have had some changes made since v1.5.8 and this has changed the line numbers that Qwomg referenced.
I found the contents indicated for line 134 are now at 144 and line 160 at 167.

My thanks to barnett and everyone else who has contributed.
Has this changed again as I can not find any of this in my controller.php??

Re: User Specific Login Redirect

Posted: Wed Feb 24, 2010 4:56 am
by bbalasateesh
I hope I am placing my query in the right place.

I developed an application in Joomla in which I have 5 types of user logins. Based on the login type each login type has different functionalities and different home pages. Now my question is when a user is already login and try to open the site in different tab, I need to redirect to the users home page based on the login type the user has logged.

For example when user is logged in and opened a new tab and typed the URL then the User should redirect to his home page and not the application home page. Currently my application is redirecting to the home page and clearing all the sessions of the logged user.

Anyone kindly tell me hoe to redirect to the logged users home page when a user has already logged in.

Thanks in advance,
Sateesh B.

Re: User Specific Login Redirect

Posted: Thu Feb 25, 2010 5:00 am
by ironman2003
I just cracked the cookie on this one myself so take a look at the post I placed here:

http://forum.joomla.org/viewtopic.php?f ... 2#p2053832

It will give you more details on what I was trying to do and I think it will work just fine.

In short- get the inlineACL plugin and set the permissions for the article you are creating - then create a menu for that article. As far as I know, you can put as many ACL instructions for that plugin in a single article as you need so perhaps no limit. Also, as far as protecting client info - there is no indication in the source code when viewed showing the other client's information which makes it very nice!

Re: User Specific Login Redirect

Posted: Wed Apr 21, 2010 1:44 pm
by the apprentice
I'm not really good at hacks (rubbish in fact) so before trying I wanted to know if this could solve my needs:

I have a country map on my homepage and I'd like users when logging to automatically only see the region, county, whatever specific area according to the address they have registered. Feasible of fantasyland with Joomla?

Re: User Specific Login Redirect

Posted: Wed Apr 21, 2010 2:41 pm
by ooffick
Sure, this is possible without any hacks. All you need to do is use an article which has a (google) map in it, and allow it show after the login.

If you prefer to do that on a country level/region with custom level maps meta mod is probably the best option, with the free GeoLite Country or City library.

However, I think you should open a new thread about that and don't hijack this one.

Olaf

Re: User Specific Login Redirect

Posted: Wed May 19, 2010 11:54 pm
by MickHill10
Hi Guys,

This is great above and exactly what I am looking for but I am seriously stuck.

I have followed the intructions for the redirection of users, I have checked MyPhpAdmin and the login=* and logout=* has appeared in the params field. I think I have inputed the controller coding correctly, but when a user logs in, it doesn't re-direct them and the same for the user loggin out.

The link to the website in question is: -

http://www.ips-photography.co.uk

My guess is that there is something wrong at the controller.php end, but pelase can somebody help becasue it is driving me potty!!!!

Cheers in advance

Re: User Specific Login Redirect

Posted: Thu May 20, 2010 8:53 am
by ooffick
Which Joomla version do you have?

Olaf

Re: User Specific Login Redirect

Posted: Thu May 20, 2010 6:21 pm
by MickHill10
Version 1.5.17

Re: User Specific Login Redirect

Posted: Thu May 20, 2010 9:01 pm
by ooffick
And what did you change so far?
Did you change the xml file?
Did you change the controller file?

Olaf

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 3:46 am
by MickHill10
Yeah I've changed the xml file and also the controller file.

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 11:36 am
by ooffick
And did you type a URL into the User's profile?

Olaf

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 2:58 pm
by MickHill10
No it was a drop down list.

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 4:40 pm
by ooffick
ok,can did you select a value, was that value saved in the database?

Olaf

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 4:50 pm
by MickHill10
in the database it said Login=2 logout=1, but in the drop down fields it would say Home or About Us. As I change which page to view in the drop downs the number will change in the URL. Hope that makes sense

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 5:07 pm
by ooffick
ok, and which part doesn't work.

Olaf

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 5:12 pm
by MickHill10
when you log in it doesn't redirect anywhere

Re: User Specific Login Redirect

Posted: Sun May 23, 2010 8:19 pm
by ooffick
ok, which controller did you change (this one: /components/com_users/controller.php) and how does your change look like?

Olaf

Re: User Specific Login Redirect

Posted: Mon May 24, 2010 5:20 pm
by MickHill10
yep it was that one and here is the change: -

if(!JError::isError($error))
{
$user =& JFactory::getUser();
$user->getParameters();
$return = $user->getParam('url');

// Redirect if the return url is not registration or login
if ( ! $return ) {
$return = 'index.php?option=com_user';
}

$mainframe->redirect( $return );
}
else
{

Re: User Specific Login Redirect

Posted: Mon May 24, 2010 6:30 pm
by ooffick
ok, and the where do you get returned to after the login? to index.php?option=com_user or the home page or the login page?

Do you use the login module to login or something like this http://***/index.php?option=com_user&view=login

Olaf

Re: User Specific Login Redirect

Posted: Mon May 24, 2010 9:18 pm
by MickHill10
here is the url after I have logged in: -

http://www.ips-photography.co.uk/index. ... n=com_user

I have installed the mod_yoo_login module for the login, but I believe this uses the same script as the normal login module.