Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [SKN] new file user login required...

Quote Reply
Re: [SKN] new file user login required... In reply to
It obviously depends on the script you are creating!

I use something like this when I create a new script:
Code:

#!/usr/bin/perl
#================================
use strict;
use lib 'your admin path';
use Links qw/:objects/; # or whatever $IN, $DB, $CFG, $USER etc...
use Links::SiteHTML; # if your using templates
use GT::Mail; # if your sending mail...
Links::init('your admin path');
Links::init_user(); # gets the user information

local $SIG{__DIE__} = \&Links::fatal;
main();
sub main {
#---------------------------------------------------
#
my $do = $IN->param('do'); # gets input

# check to see if your logged in
if (!$USER) {
print $IN->redirect('$CFG->{db_cgi_url}/user.cgi?url=path to this filename');

}

# the rest of your script...

}


Hope this helps,

- Jonathan
Subject Author Views Date
Thread new file user login required... jdgamble 6406 Jan 9, 2005, 1:33 PM
Thread Re: [jdgamble] new file user login required...
brewt 6198 Jan 9, 2005, 2:37 PM
Thread Re: [brewt] new file user login required...
jdgamble 6198 Jan 9, 2005, 3:05 PM
Thread Re: [jdgamble] new file user login required...
brewt 6183 Jan 9, 2005, 3:50 PM
Post Re: [brewt] new file user login required...
jdgamble 6208 Jan 9, 2005, 4:47 PM
Thread Re: [jdgamble] new file user login required...
SKN 6188 Jan 28, 2005, 2:39 PM
Thread Re: [SKN] new file user login required...
jdgamble 6156 Jan 28, 2005, 3:41 PM
Thread Re: [jdgamble] new file user login required...
SKN 6151 Jan 28, 2005, 3:52 PM
Thread Re: [SKN] new file user login required...
jdgamble 6143 Jan 28, 2005, 4:05 PM
Thread Re: [jdgamble] new file user login required...
SKN 6169 Jan 28, 2005, 4:26 PM
Post Re: [SKN] new file user login required...
jdgamble 6153 Jan 28, 2005, 4:50 PM
Thread Re: [SKN] new file user login required...
yogi 6154 Jan 29, 2005, 2:38 AM
Post Re: [yogi] new file user login required...
SKN 6158 Jan 29, 2005, 11:15 AM
Thread Re: [yogi] new file user login required...
jdgamble 6117 Jan 29, 2005, 6:07 PM
Post Re: [jdgamble] new file user login required...
yogi 6110 Jan 30, 2005, 4:07 AM
Post Re: [jdgamble] new file user login required...
courierb 5870 Aug 13, 2007, 12:23 AM