[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Username already exists



I got the script to work in the shell, when I run it from PHP I get the
following error:

Can't locate Cobalt/Meta.pm in @INC (@INC contains:
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .)
at /usr/lib/perl5/site_perl/5.005/Cobalt/Vsite.pm line 51.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.005/Cobalt/User.pm line 47.

Can somebody help

TIA,

JEFF

----- Original Message -----
From: "Jens Kristian Søgaard" <jens@xxxxxxxxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Sunday, April 01, 2001 4:11 PM
Subject: Re: [cobalt-users] Username already exists


> Hi Jeff and all,
>
> > I'm creating a page in PHP (could be perl) where users can signup for an
> > user account on our RAQ. I need a script that can check if a username is
> > already taken either as a user account or a mail alias. Would somebody
> > please share their knowledge or ideas on this topic.
>
> You need to use a combination of a few Cobalt functions. The easiest thing
> is to use Perl, and use code like this (just an example -- the code has
not
> been tested):
>
> use Cobalt::User;
> use Cobalt::List;
>
> sub userAlive
> {
>   $username = shift;
>   return "User already exists in passwd file" if(
> Cobalt::User::user_exist( $username ) );
>   return "Alias already exist with that name" if(
> Cobalt::List::alias_exist( $username ) );
>   return "List already exist with that name" if( Cobalt::List::list_exist(
> $username ) );
>   return "All clear";
> }
>
> Remember to check for things like people wanting to add users named
"admin",
> "wheel" and similar fun stuff.
>
> --
> Jens Kristian Søgaard, Mermaid Consulting I/S,
> jens@xxxxxxxxxxxxxxxxxxxx,
> http://www.mermaidconsulting.com/
>
>
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>