Forums  ›  Cheetah  ›  Support
 

Redirect link after login using email validation.

 

$sUrlRelocate = CH_WSB_URL_ROOT . getUsername ($member['ID']);

That's the code I used, but I also tried replacing it with other variations when It didn't work. 

I think there may be something wrong with the browser cache cleaner I'm using, or even the Chrome Browser. I manually cleared all the caches, did an Admin cache clean, closed the site and Chrome, restarted and I was still getting a Page Not Found error on all three sites.

When I started afresh the next day, all sites worked perfectly without me changing anything. My Internet connection is so bad, I'm wondering if the caches aren't being cleaned properly. 

I apologise for wasting your time.

 

 

I tried several combinations but no success. Username, Username, Fullname, FullName.

It works fine on a clean install until I change from Username to Full Name in Advanced Settings.

If I use 'profile.php', it brings up my profile, but the sub menu is missing.

Too late to do any more tests tonight.

Thats not exactly what i meant. Per my first post i had this code.

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

I meant change getNickName to getUsername so it looks like this instead.

$sUrlRelocate = CH_WSB_URL_ROOT . getUsername ($member['ID']);

Boonex added a new function back when they implemented that change in the display names. I may have used the wrong function when i first posted the code.

I tried several combinations but no success. Username, Username, Fullname, FullName.

It works fine on a clean install until I change from Username to Full Name in Advanced Settings.

If I use 'profile.php', it brings up my profile, but the sub menu is missing.

Too late to do any more tests tonight.

Try using the function getUsername instead of getNickName

 

 

I'm raising this again because the code only works if your site displays usernames. As my members are using some weird usernames, my site shows their full name and refers to them by their full name. 

This option is available in Admin/Settings/Advanced Settings/Profiles/Member Display-Name. Provided the option is set to Username, the code supplied by Deano in this thread will work. If you change it to Full Name, the code will produce a Page Not Found error.

It took me two days to figure out why the code wasn't working, but I still haven't worked out what the code should be. I've tried "Profile.php" and it works, but the sub-menus aren't displayed. Help is therefore needed.

It should be noted that the above code replacement shown in this thread, only works if the user logs in using the block to the right of the Logo. If you have placed another login block somewhere else, you must also change inc/design.inc.php around line 345 or members using that login method will be taken somewhere else.

Yes it's in member.php

Starting at line 162 look for this.

if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php' or 0 !== mb_stripos($sRelocate, CH_WSB_URL_ROOT)) {
    $sUrlRelocate = CH_WSB_URL_ROOT . 'member.php';
}

 

You will need to change this.

$sUrlRelocate = CH_WSB_URL_ROOT . 'member.php';

To this.

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

 

 

I'm trying different join procedures to make it easier for new members.  Some members have expressed concern over the time it takes admins to approve profiles, despite being between 1 and 6 hours. As it's a site with very few daily join-ups we're considering this method in Advanced Settings/Moderation:

Auto-activate profiles after joining
Preserve profile status after profile info editing
Auto-confirm profile without confirmation email
Enable notification about new members
Enable notification about unregistered members

When the prospective member gets a validation email and clicks the link, they eventually reach this window:

When they login, they're taken to the Account page, but in our case, this is the least used page on the site. Our rewritten email instructs them to update their Profile before anything else, so we want them to be taken to the Profile page first. 

Unfortunately I can't find the place to change the URL to achieve this. Hopefully it's not difficult.

I understand the location is in member.php

 
Forums  ›  Cheetah  ›  Support