forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: WBL on September 11, 2007, 06:29:35 am
-
How to automatically redirect the user to "My gallery" View [index.php?cat=10010] after login?
Searched the forum but couldnt find a thread which diverts me to the thumbnail view, but i woild like the logged in user to be redirected to his own Gallery
Thanks a lot
-
Edit login.php and
add this
$referer = 'index.php?cat=1000'.$USER_DATA['user_id']; //Mod redirect user to his/her own gallery
to line #39 after this
$referer=preg_replace("'&'","&",$referer);
This will redirect logged in user to his/her own gallery
Edit : use Nibbler's code instead of this
-
Thanks a lot , it worked
-
Won't work for long. Should read as follows.
$referer = 'index.php?cat=' . (10000 + $USER_DATA['user_id']); //Mod redirect user to his/her own gallery
-
I was sleepy :)
@Nibbler:Indeed you are correct , thanks for pointing that out
@ritson : Please use Nibbler's code cause there is an user_id limit with my code , it's only working with user_id < 10 and other users with user_id more than 9 will see the error message
-
Hi Thanks a lot for the support, I have corrected the code..