Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Users question

Quote Reply
Users question
Hi

I am trying to give specific user (by e-mail address or user name) a privilage where all the links he/she submits are validated..? The user is not admin nor an editor..

Any suggestions?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Users question In reply to
The steps you would need to do are:

1. Add a column 'AutoApprove' to the Users table and default it to No.

2. Add a global on the add_success page:

sub {
my $tags = shift;
return unless $USER;
return unless ($USER->{AutoApprove} eq 'Yes');
my $link_db = $DB->table('Links');
my $link = $link_db->get($tags->{ID});
$link->{isValidated} = 'Yes';
$link_db->modify($link);
return;
}

what that will do is validate a link the currently logged on user just added if they have AutoApprove set to yes.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Users question In reply to
Hi

Great thnaks
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [Alex] Users question In reply to
This global doesn't work for me.

LinksSQL version 2.1.2 + Community beta 3

I don't think that it has to do anything with community because it

also doesn't work with only LinksSQL installed.



Any ideas?

Thanks!
Quote Reply
Re: [Payooo] Users question In reply to
I changed table('Links'); to table('links'); and it works now Wink



Is there a way to do the same thing with modify part?

Thanks in advance!