NAME

My::User - Create and manipulate SPOPS users.

SYNOPSIS

use My::User;
$user = My::User->new();
$user->{login_name} = 'blah';
$user->{password}   = 'blahblah';
$user->{first_name} = 'B';
$user->{last_name}  = 'Lah';
eval { $user->save };
if ( $@ ) {
    print "Cannot save user: $@\n";
}

# Use crypt()ed password
$My::User::crypt_password = 1;

# Check the password
unless ( $user->check_password( $given_password ) ) {
    print "Invalid login!\n";
}

# Add this user to the group 'public'
$user->make_public;

DESCRIPTION

This has the most basic user properties. Customization will probably be necessary.

METHODS

full_name()

Returns the full name -- it is accessed often enough that we just made an alias for concatenating the first and last names.

check_password( $pw )

Return a 1 if the password matches what is in the database, a 0 if not.

TO DO

Nothing known.

BUGS

None known.

COPYRIGHT

Copyright (c) 2001-2002 intes.net, inc.. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>