D7 - Redirect after login

Ok, having a bit of a brain fart here, Can someone tell me how to redirect a member to their profile page instead of the Account/Dashboard (member.php)? I want them to go to their profile page instead.

Chris

Nothing to see here
Quote · 17 Feb 2010

Ok, I have tried to locate this and only thing I could find were 2 files that may play the part in redirection. In the design.inc.php there 2 areas that contain member.php and this is one of them:

Under function getMemberLoginFormCode

$aForm = array(
'form_attrs' => array(
'id' => $sID,
'action' => BX_DOL_URL_ROOT . 'member.php',
'method' => 'post',
'onsubmit' => "validateLoginForm(this); return false;",

There are 2 instance in this file. Changing them to reflect profile.php instead give your a username/password error every time. So I decided to look in functions.js and it has 2 instances of member.php in it also, like below:

Under function showPopupLoginForm

site_url + 'member.php',

So I changed them in both files to profile.php and still got a username/password error. Re-uploading the originals would allow you to login again. Any help would be appreciated.

Chris

Nothing to see here
Quote · 17 Feb 2010

edit member.php

About line 700 near the bottom of the file.

Comment out the 2 lines in blue and add the line in green

//            if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.php' )
//                 $sUrlRelocate = $_SERVER['PHP_SELF'];


$sUrlRelocate = $site['url'] . getNickName($member['ID']);

That should do it.

https://www.deanbassett.com
Quote · 17 Feb 2010

Ok, let me see if I can find a way to say this right.......

YOU RAWK !!

Thanks,

Chris

Nothing to see here
Quote · 17 Feb 2010

Now should i make a module that allows people to setup any page they want as a redirect after join login.

Might upset HL. It's a basic function. LOL.  Just kidding HL.

https://www.deanbassett.com
Quote · 17 Feb 2010

Absolutely.. I think it would be a great idea to have the option to redirect to whatever the Webmaster wants to use. Especially if it requires altering at least 4-5 database tables.

BTW, we are just messing in good fun :)

Although the mod would nice :)

Chris

Nothing to see here
Quote · 17 Feb 2010

I'd love the redirect to go to the homepage. Many of my members are complaining about that, and newer members miss all the "goodies" on the homepage.

Quote · 26 Feb 2010

I'd love the redirect to go to the homepage. Many of my members are complaining about that, and newer members miss all the "goodies" on the homepage.

To home page is just as easy.

edit member.php

About line 700 near the bottom of the file.

Comment out the 2 lines in blue and add the line in green

//            if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.php' )
//                 $sUrlRelocate = $_SERVER['PHP_SELF'];


$sUrlRelocate = $site['url'];

That should do it.

https://www.deanbassett.com
Quote · 26 Feb 2010

And it did it!

Thank you so much!

Quote · 26 Feb 2010

Ok. I whipped up a free mod for this.

It's in my market section.

Enjoy.

https://www.deanbassett.com
Quote · 28 Feb 2010

Ok. I whipped up a free mod for this.

It's in my market section.

Enjoy.

Thank you Deano, very good and usefull mod !!

Great job and thank to make it free !!

...
Quote · 28 Feb 2010

Is there a mod out there that redirects a specific membership type to a specific page?  For example, I would like Standard Members to go to the "My Membership" page so that they'll purchase an upgrade.  If they are a Promotion member, Gold, Bronze then they would go to member.php page.

Thanks in advance,

Glen

Quote · 8 Mar 2010

Deano, do you know what code I need to add to redirect page if for example:

When member is first time joining, to redirect them to the pedit.php to fill their profile and other fields. (I used your nice mod!)

if for some reason they don't fill the form to redirect them all the time when they login until they complete filling it. Maybe having for example a field FILLED=Checked so I can verfify against it.

If this field is checked, to redirect them to home page.


I created a field "Form Completed"=YES/NO

Quote · 31 Mar 2010

Deano,

Experiencing a problem with this mod. Once implemented, users logging in incorrectly see a blank page instead of the alert box:

Your username or password was incorrect. Please try again.

Posted the problem in forums recently here.

Has the code changed since it was made available in this post or does the free mod mentioned fix it (haven't tried it)?

Thanks

Quote · 19 Jan 2011

Is there an update for login redirect for 7.0.5?

Quote · 26 Feb 2011

 

Is there an update for login redirect for 7.0.5?

Nope. None of my mods required updating. All mods that worked on 7.0.4 work on 7.0.5.


https://www.deanbassett.com
Quote · 26 Feb 2011

But you should also use the mod posted here. http://www.boonex.com/unity/extensions/entry/Redirect_to_any_page_after_logon_

Instead of this outdated code in this post.

https://www.deanbassett.com
Quote · 26 Feb 2011

Deano...how long have you been working with Dolphin? You apparently know the software inside and out...hence the great mods you build.

Jeremy
Quote · 26 Feb 2011

 

Deano...how long have you been working with Dolphin? You apparently know the software inside and out...hence the great mods you build.

I don't remember. Started with dolphin 6.1.3 or something i think. 3-4 years.

And i don't know every area of dolphin. There are modules i cannot do a thing with. Such as.

Forums
Photos
Videos
Sounds

And perhaps a few others.

If i did i would have those STUPID private folders with the blue padlocks gone by now.


https://www.deanbassett.com
Quote · 26 Feb 2011

LOL. I think that is a feature that they built in specifically so that we have a private folder as soon as registration takes place of a new member. I really see no need for it...but hey, not going to complain too much. Dolphin gives so much right out the box. Now if I can just learn it a lot more.

Jeremy
Quote · 27 Feb 2011

 

Ok. I whipped up a free mod for this.

It's in my market section.

Enjoy.

Hi,

does this also work on 7.0.6

Thanks

www.ptcgalaxy.net
Quote · 2 May 2011

Hey great mod. Your mods are all so usefull. Was wondering how hard it would be to add a function of a first time login redirect to like a special offer only available to new members sign ups. Like a one time offer.

Quote · 2 May 2011

PERFECT!

The Earth is the LORD's and the fullness therof, the world and they that dwell therin... Psalm 24:1
Quote · 16 Jul 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.