Class GP_User

Description

Located in /gp-includes/things/user.php (line 2)

GP_Thing
   |
   --GP_User
Variable Summary
Method Summary
void admin ()
void by_login ( $login)
void can ( $action, [ $object_type = null], [ $object_id = null], [ $extra = null])
void create ( $args)
void current ()
void delete_meta ( $key)
void get ( $user_or_id)
void get_meta ( $key)
void logged_in ()
void login ( $password)
void logout ()
void normalize_fields ( $args)
void set_as_current ()
void set_meta ( $key,  $value)
Variables
mixed $field_names = array( 'id', 'user_login', 'user_pass', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_status', 'display_name' ) (line 5)

Redefinition of:
GP_Thing::$field_names
mixed $non_updatable_attributes = array( 'ID' ) (line 6)
mixed $table_basename = 'users' (line 4)

Inherited Variables

Inherited from GP_Thing

GP_Thing::$errors
GP_Thing::$map_results
GP_Thing::$non_db_field_names
GP_Thing::$per_page
GP_Thing::$static
GP_Thing::$static_by_class
GP_Thing::$table
GP_Thing::$validation_rules
GP_Thing::$validation_rules_by_class
Methods
admin (line 61)

Determines whether the user is an admin

void admin ()
by_login (line 33)
void by_login ( $login)
  • $login
can (line 93)

Determines whether the user can do $action on the instance of $object_type with id $object_id.

If the method is called statically, it uses the current session user.

Example: $user->can( 'read', 'translation-set', 11 );

void can ( $action, [ $object_type = null], [ $object_id = null], [ $extra = null])
  • $action
  • $object_type
  • $object_id
  • $extra
create (line 8)
void create ( $args)
  • $args

Redefinition of:
GP_Thing::create()
Inserts a new row
current (line 45)
void current ()
delete_meta (line 131)
void delete_meta ( $key)
  • $key
get (line 27)
void get ( $user_or_id)
  • $user_or_id

Redefinition of:
GP_Thing::get()
get_meta (line 114)
void get_meta ( $key)
  • $key
logged_in (line 39)
void logged_in ()
login (line 68)

Set $this as the current user if $password patches this user's password

void login ( $password)
  • $password
logout (line 53)
void logout ()
normalize_fields (line 18)
void normalize_fields ( $args)
  • $args

Redefinition of:
GP_Thing::normalize_fields()
Normalizes an array with key-value pairs representing a GP_Thing object.
reintialize_wp_users_object (line 136)
void reintialize_wp_users_object ()
set_as_current (line 79)

Makes the user the current user of this session. Sets the cookies and such.

void set_as_current ()
set_meta (line 127)
void set_meta ( $key,  $value)
  • $key
  • $value

Inherited Methods

Inherited From GP_Thing

GP_Thing::__construct()
GP_Thing::after_create()
GP_Thing::after_save()
GP_Thing::all()
GP_Thing::apply_default_conditions()
GP_Thing::coerce()
GP_Thing::create()
GP_Thing::create_and_select()
GP_Thing::delete()
GP_Thing::delete_all()
GP_Thing::fields()
GP_Thing::find()
GP_Thing::find_many()
GP_Thing::find_one()
GP_Thing::force_false_to_null()
GP_Thing::found_rows()
GP_Thing::get()
GP_Thing::get_static()
GP_Thing::has_static()
GP_Thing::like_escape_printf()
GP_Thing::many()
GP_Thing::map()
GP_Thing::normalize_fields()
GP_Thing::now_in_mysql_format()
GP_Thing::one()
GP_Thing::prepare()
GP_Thing::prepare_fields_for_create()
GP_Thing::prepare_fields_for_save()
GP_Thing::query()
GP_Thing::reload()
GP_Thing::restrict_fields()
GP_Thing::save()
GP_Thing::select_all_from_conditions_and_order()
GP_Thing::set_fields()
GP_Thing::set_static()
GP_Thing::sql_condition_from_php_value()
GP_Thing::sql_from_conditions()
GP_Thing::sql_from_order()
GP_Thing::sql_limit_for_paging()
GP_Thing::update()
GP_Thing::validate()
GP_Thing::value()
GP_Thing::__call()

Documentation generated on Fri, 18 May 2012 01:46:13 +0100 by phpDocumentor 1.4.3