Page 1 of 1

Require User to Login

Posted: 07 Mar 2012, 07:20
by JasonHayes
Hey I love this PayPal Mod. I think it is exactly what I need. However I want to make all of this mod visible only to those who have logged in. I know how to show and hide links based on if the user is logged in, however I do not know how to make the actual donate.php page only visible to users who are logged in and if not redirect the user to login first.

Any help with this would be greatly appreciated.

Thanks,

Jason

Require User to Login

Posted: 07 Mar 2012, 08:07
by Stoker
open donate.php and find:

Code: Select all

$user->setup('mods/donate');
After add:

Code: Select all

    if ($user->data['user_id'] == ANONYMOUS)
    {
        login_box('', $user->lang['LOGIN']);
    } 

Require User to Login

Posted: 08 Mar 2012, 03:40
by JasonHayes
Thank you very much. Works like a charm. Thank you for the quick response.

Require User to Login

Posted: 04 Jul 2012, 20:22
by Tanbheer
i added that text but it still shows donation mod on my forum if i visit it as guest.

Require User to Login

Posted: 04 Jul 2012, 20:35
by martin123456
Refresh styles and purge the cache and if that fails F5 wink

Require User to Login

Posted: 04 Jul 2012, 20:49
by Tanbheer
already did that..but no luck ...:(