Author |
Message |
aseitz
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/9fbf09cf44a415c1f06f0.jpg)
Joined: Mar 08, 2005
Posts: 57
Location: Portland, Oregon USA
|
Posted:
Tue Jun 27, 2006 11:01 am |
|
How do I redirect a user to the mainpage (index.html) instead of their account page on login?
-- EDIT --
Fixed, see final 3 posts for completion steps. |
Last edited by aseitz on Tue Jun 27, 2006 12:38 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Tue Jun 27, 2006 11:34 am |
|
You mean, so you can prevent them from logging in? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
aseitz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 27, 2006 11:37 am |
|
Guardian2003 wrote: | You mean, so you can prevent them from logging in? |
Nono, I want them to log in.
I just don't want them to log in and the first thing they see is the "My Account" screen. I would much rather it just re-directed back to the main page, all logged in and stuff. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 27, 2006 11:54 am |
|
Well I know this has been covered before so searching the forums might help you.
I think this is in the function login(). It has something like Code:if (empty($redirect)) {
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
|
You could try changing that to something like Code:
if (empty($redirect)) {
Header("Location: index.php);
|
In any event, you will need to alter the code in the user info block, the login block, the relevant forum files etc to be consistently redirecting users back to the home page. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
gregexp
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/458c161744a70db912a6e.jpg)
Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Tue Jun 27, 2006 12:09 pm |
|
Find this line in index.php of the Your account module, under function login
Code: if (empty($redirect)) {
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
|
then make it:
Code: if (empty($redirect)) {
Header("Location: index.php");
|
Have not been able to test this so BACK IT UP FIRST. |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
![ICQ Number ICQ Number](themes/RavenIce/forums/images/lang_english/icon_icq_add.gif) |
![](themes/RavenIce/forums/images/spacer.gif) |
gregexp
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 27, 2006 12:15 pm |
|
sorry guardian...i had this screen open for a bit while i searched for the code.
didnt see that you were on and thought perhaps you had limited time as others do. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
aseitz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 27, 2006 12:37 pm |
|
Thanks you two, it worked like a charm! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 28, 2006 12:18 am |
|
No problem, glad it worked as I didn't test it.
darklord - not a problem, better to have 2 answers the same than no reply at all ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
CodyG
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/186c8977515afcc3ed82a.jpg)
Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Fri Apr 10, 2009 4:22 pm |
|
Does this method still work for RN 2.3.1?
IOW, can I change line 210 in Your_Account/index.php
Code:
} elseif ($redirect == '') {
Header('Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=' . $username);
|
to this?
Code:
} elseif ($redirect == '') {
Header('Location: index.php);
|
I'm wondering if YA has been reworked in such a way to not allow this tweek. |
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
misterpat
Hangin' Around
![](modules/Forums/images/avatars/Animaniacs/Animaniacs_-_Stinkbomb.gif)
Joined: Mar 02, 2009
Posts: 48
|
Posted:
Fri Apr 10, 2009 5:11 pm |
|
I have done it on my RN 2.3.1 and it works great. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|