Chirpy! 0.3 API Documentation
Chirpy::Account
NAME
Chirpy::Account - Represents a user account
SYNOPSIS
$account = new Chirpy::Account($id, $username, $password, $level); $id = $account->get_id(); $account->set_id($id); $username = $account->get_username($username); $account->set_username($username); $password = $account->get_password(); $account->set_password($password); $level = $account->get_level(); $account->set_level($level);
CONSTRAINTS
- ID
-
The account ID must be a positive non-zero integer.
- Username
-
The username must be valid against the
valid_username()
function of Chirpy::Util. - Password
-
Encryption is done before invoking the constructor or the
set_password()
function. Theget_password()
function returns the encrypted password. The password must be valid against thevalid_password()
function and encrypted using theencrypt()
function, both part of Chirpy::Util. - User Level
-
The user level must be one of the user level constants described below.
USER LEVEL CONSTANTS
The following constants are recommended for use as user levels:
Chirpy::Account::USER_LEVEL_3 Chirpy::Account::USER_LEVEL_6 Chirpy::Account::USER_LEVEL_9
Note that the value of these is the integer representing the user level and that the constants are only for the sake of code readability.
AUTHOR
Tim De Pauw <ceetee@users.sourceforge.net>
SEE ALSO
Chirpy, http://chirpy.sourceforge.net/
COPYRIGHT
Copyright 2005-2007 Tim De Pauw. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.