Inheritance diagram for User:
Collaboration diagram for User:Public Member Functions | |
| __construct ($paramarray=array()) | |
| insert () | |
| update () | |
| delete () | |
| remember () | |
| forget ($redirect=true) | |
| count_posts ($status=false) | |
| can ($token, $access= 'any') | |
| can_any ($token_access=array()) | |
| cannot ($token) | |
| grant ($tokens, $access= 'full') | |
| deny ($tokens) | |
| revoke ($tokens) | |
| in_group ($group) | |
| add_to_group ($group) | |
| remove_from_group ($group) | |
| __get ($name) | |
| get_url_args () | |
Static Public Member Functions | |
| static | default_fields () |
| static | anonymous () |
| static | identify () |
| static | create ($paramarray) |
| static | authenticate ($who, $pw) |
| static | get ($who) |
| static | get_by_id ($id) |
| static | get_by_name ($username) |
| static | get_by_email ($email) |
| static | get_id ($user) |
| static | commenter () |
Protected Attributes | |
| $url_args | |
Habari UserRecord Class
Includes an instance of the UserInfo class; for holding inforecords about the user If the User object describes an existing user; use the internal info object to get, set, unset and test for existence (isset) of info records $this->info = new UserInfo ( 1 ); // Info records of user with id = 1 $this->info->option1 = "blah"; // set info record with name "option1" to value "blah" $info_value = $this->info->option1; // get value of info record with name "option1" into variable $info_value if ( isset ($this->info->option1) ) // test for existence of "option1" unset ( $this->info->option1 ); // delete "option1" info record
Definition at line 24 of file user.php.
| User::__construct | ( | $ | paramarray = array() |
) |
Constructor for the User class
| array | $paramarray an associative array of initial User fields |
Reimplemented from QueryRecord.
| User::__get | ( | $ | name | ) |
Capture requests for the info object so that it can be initialized properly when the constructor is bypassed (see PDO::FETCH_CLASS pecularities). Passes all other requests to parent.
| string | $name requested field name |
Reimplemented from QueryRecord.
| User::add_to_group | ( | $ | group | ) |
| static User::anonymous | ( | ) | [static] |
Build and return the anonymous user
Definition at line 71 of file user.php.
Referenced by UserGroup::__get(), AdminGroupsHandler::ajax_groups(), AdminGroupsHandler::get_group(), and identify().
| static User::authenticate | ( | $ | who, | |
| $ | pw | |||
| ) | [static] |
Check a user's credentials to see if they are legit -- calls all auth plugins BEFORE checking local database.
| string | $who A username or email address | |
| string | $pw A password |
Definition at line 257 of file user.php.
Referenced by UserHandler::act_login(), and AtomHandler::is_auth().
| User::can | ( | $ | token, | |
| $ | access = 'any' | |||
| ) |
Determine if a user has a specific token permission
| string | $token The name of the token for which to check permission | |
| string | $access The type of access to check for (read, write, full, etc.) |
Definition at line 465 of file user.php.
Referenced by can_any().
| User::can_any | ( | $ | token_access = array() |
) |
| User::cannot | ( | $ | token | ) |
| static User::commenter | ( | ) | [static] |
Returns an array of information about the commenter If this is a logged-in user, then return details from their user profile. If this is a returning commenter, then return details from their cookie otherwise return empty strings.
| User::count_posts | ( | $ | status = false |
) |
| static User::create | ( | $ | paramarray | ) | [static] |
| static User::default_fields | ( | ) | [static] |
Get default fields for this record.
Definition at line 41 of file user.php.
Referenced by Users::get().
| User::delete | ( | ) |
| User::deny | ( | $ | tokens | ) |
| User::forget | ( | $ | redirect = true |
) |
| static User::get | ( | $ | who | ) | [static] |
Fetch a user from the database by name, ID, or email address. This is a wrapper function that will invoke the appropriate get_by_* method.
| mixed | $who user ID, username, or e-mail address |
Definition at line 321 of file user.php.
Referenced by UserHandler::act_login(), UserHandler::act_password_reset(), add_to_group(), commenter(), get_by_email(), get_by_id(), get_by_name(), get_id(), ACL::get_user_token_access(), insert(), remove_from_group(), Posts::search_to_get(), and ACL::user_tokens().
| static User::get_by_email | ( | $ | ) | [static] |
| static User::get_by_id | ( | $ | id | ) | [static] |
Select a user from the database by its id
| int | $id The id of a user |
Definition at line 349 of file user.php.
Referenced by AtomHandler::add_posts(), AdminGroupsHandler::ajax_groups(), AdminUsersHandler::form_user_success(), get(), AtomHandler::get_entry(), identify(), and AdminUsersHandler::update_users().
| static User::get_by_name | ( | $ | username | ) | [static] |
Select a user from the database by its username
| string | $username The name of a user |
Definition at line 370 of file user.php.
Referenced by authenticate(), get(), AdminUsersHandler::get_user(), AdminUsersHandler::post_users(), and FormValidators::validate_username().
| static User::get_id | ( | $ | user | ) | [static] |
| User::get_url_args | ( | ) |
Returns a set of properties used by URL::get to create URLs
Reimplemented from QueryRecord.
| User::grant | ( | $ | tokens, | |
| $ | access = 'full' | |||
| ) |
| static User::identify | ( | ) | [static] |
Check for the existence of a cookie, and return a user object of the user, if successful
Definition at line 87 of file user.php.
Referenced by AdminHandler::__construct(), Modules::__static(), AjaxHandler::act_auth_ajax(), UserHandler::act_logout(), K2::action_block_content_k2_menu(), CoreBlocks::action_block_content_meta_links(), ViddlerSilo::action_plugin_ui(), FlickrSilo::action_plugin_ui_confirm(), FlickrSilo::action_plugin_ui_deauthorize(), Undelete::action_template_header(), FeedbackHandler::add_comment(), K2::add_template_vars(), Charcoal::add_template_vars(), Theme::add_template_vars(), Theme::check_scope_criteria(), Post::comment_form(), commenter(), Modules::commit_active(), AdminDashboardHandler::fetch_dashboard_modules(), CoreDashModules::filter_dash_module_latest_comments(), CoreDashModules::filter_dash_module_latest_entries(), CoreDashModules::filter_dash_module_latest_log_activity(), CoreDashModules::filter_dash_modules(), AdminHandler::filter_menus_by_permission(), AdminCommentsHandler::form_comment(), AdminUsersHandler::form_user_success(), LogEntry::get(), Posts::get(), Comments::get(), Post::get_access(), Comment::get_access(), AdminDashboardHandler::get_dashboard(), FormControl::get_default(), Post::get_form(), Modules::get_option(), AdminPostsHandler::get_publish(), AdminUsersHandler::get_user(), AtomHandler::is_auth(), EventLog::log(), FormControl::save(), FormUI::save(), Modules::set_option(), FlickrSilo::silo_contents(), ViddlerSilo::silo_dir(), AdminUsersHandler::update_users(), ViddlerSilo::updated_config(), and Utils::WSSE().
| User::in_group | ( | $ | group | ) |
| User::insert | ( | ) |
Save a new user to the users table
Reimplemented from QueryRecord.
| User::remove_from_group | ( | $ | group | ) |
| User::revoke | ( | $ | tokens | ) |
| User::update | ( | ) |
Updates an existing user in the users table
Reimplemented from QueryRecord.
1.7.1