Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Here's a cutdown version of our internal "Add a user to the app" program:

#!/usr/bin/env perl

use lib '../Jifty/lib';
use lib 'lib';

use Jifty::Everything;
BEGIN { Jifty->new() }
use BTDT::CurrentUser;
use BTDT::Model::User;
use Getopt::Long;
my $name = 'admin';
GetOptions( 'type=s' => \$type, 'name=s' => \$name);

my $u = BTDT::Model::User->new( current_user => BTDT::CurrentUser->superuser );

my ( $id, $msg ) = $u->create(
name => $name,
password => 'password',
);

print $msg unless ($id);

Loading...