User Specific Login Redirect
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Nov 18, 2009 4:24 pm
Re: User Specific Login Redirect
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
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
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Nov 24, 2009 4:35 pm
Re: User Specific Login Redirect
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!
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!
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
You could add a small module to add a link like that.
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Nov 24, 2009 4:35 pm
Re: User Specific Login Redirect
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.
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
You would need to create a new module to add this link.
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 44
- Joined: Sat Jun 13, 2009 11:21 pm
Re: User Specific Login Redirect
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.ooffick wrote:You would need to create a new module to add this link.
Olaf
Last edited by Sparky9292 on Sun Nov 29, 2009 12:23 am, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 44
- Joined: Sat Jun 13, 2009 11:21 pm
Re: User Specific Login Redirect
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.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!
Seems like a "jank" way of doing this.
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
If you don't like MetaMod, you will need to develop you own small little module.
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Oct 13, 2009 3:39 pm
Re: User Specific Login Redirect
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.
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.
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
First, I would recommend to update to 1.5.15kskamalakumar 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.
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Intern
- Posts: 71
- Joined: Fri Oct 02, 2009 8:39 am
Re: User Specific Login Redirect
Has this changed again as I can not find any of this in my controller.php??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.
-
- Joomla! Intern
- Posts: 64
- Joined: Wed Jun 10, 2009 5:45 am
Re: User Specific Login Redirect
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.
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.
-
- Joomla! Intern
- Posts: 80
- Joined: Wed Nov 23, 2005 5:38 am
Re: User Specific Login Redirect
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!
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!
-
- Joomla! Guru
- Posts: 801
- Joined: Wed Nov 18, 2009 3:53 pm
Re: User Specific Login Redirect
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?
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?
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
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
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
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
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
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
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
Which Joomla version do you have?
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
Version 1.5.17
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
And what did you change so far?
Did you change the xml file?
Did you change the controller file?
Olaf
Did you change the xml file?
Did you change the controller file?
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
Yeah I've changed the xml file and also the controller file.
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
And did you type a URL into the User's profile?
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
No it was a drop down list.
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
ok,can did you select a value, was that value saved in the database?
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
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
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
ok, and which part doesn't work.
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
when you log in it doesn't redirect anywhere
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
ok, which controller did you change (this one: /components/com_users/controller.php) and how does your change look like?
Olaf
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
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
{
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
{
- ooffick
- Joomla! Master
- Posts: 11615
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: User Specific Login Redirect
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
Do you use the login module to login or something like this http://***/index.php?option=com_user&view=login
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Wed May 19, 2010 11:48 pm
Re: User Specific Login Redirect
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.
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.