Chirpy! 0.3 API Documentation
Chirpy::Account - Represents a user account
$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);
The account ID must be a positive non-zero integer.
The username must be valid against the
valid_username()function of Chirpy::Util.
Encryption is done before invoking the constructor or the
get_password()function returns the encrypted password. The password must be valid against the
valid_password()function and encrypted using the
encrypt()function, both part of Chirpy::Util.
- User Level
The user level must be one of the user level constants described below.
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.
Tim De Pauw <firstname.lastname@example.org>
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.