User_Model Class Reference

User model. More...

Inheritance diagram for User_Model:
BaseUser_Model Object_Model BaseObject_Model User_AlwaysAuth_Model User_NoAuth_Model

Public Member Functions

 __construct (array $data=array())
 Constructs a new user, if data is provided the user will be populated with that data.
 __get ($property)
 Backwards compatibility with now removed op5user class.
 __set ($property, $value)
 Backwards compatibility with now removed op5user class.
 __isset ($property)
 get_avatar_url ($size=28)
 Retrieves the users avatar, currently this attempts to retrieve it from gravatar.
 get_display_name ()
 Returns a display name of the user, i.e.
 set_password ($value)
 Autogenerated function.
 has_logged_in ()
 Returns a boolean whether this user has logged in to the product before.
 get_last_login_time ()
 Returns the timestamp of this users last login or null if no time was found.
 get_permission_regexp ()
 Return a regexp for matching a quark string for the current users access.
 authorized_for ($auth_point)
 Returns if a user is authorized for a certain authorization point.
 authorized_for_object ($object_type, $object_definition, $case_sensitivity=true)
 Test if user is authorized for viewing a certain object.
 logged_in ()
 Returns true if logged in.
 get_contact_groups ()
 List all contact groups I am a member of.
 get_usergroups_set ()
 Get a set of all user groups for this user.
 getActorInfo ()
 Return information about the user, to be used as an actor in the MayI interface.

Protected Member Functions

 validate ()
 Autogenerated function.

Protected Attributes

 $custom_properties = array()
 For backward compatible reasons.
 $export
 Autogenerated varible.

Detailed Description

User model.

Todo:
: documentation

Constructor & Destructor Documentation

User_Model::__construct ( array $  data = array()  ) 

Constructs a new user, if data is provided the user will be populated with that data.

Parameters:
$data array User data

Member Function Documentation

User_Model::__get ( property  ) 

Backwards compatibility with now removed op5user class.

Parameters:
$property 
Returns:
mixed
User_Model::__isset ( property  ) 
Parameters:
$property 
Returns:
boolean
User_Model::__set ( property,
value 
)

Backwards compatibility with now removed op5user class.

Parameters:
$property 
$value 
User_Model::authorized_for ( auth_point  ) 

Returns if a user is authorized for a certain authorization point.

Parameters:
$auth_point string
Returns:
boolean true if user has access to that authorization point

Reimplemented in User_NoAuth_Model.

User_Model::authorized_for_object ( object_type,
object_definition,
case_sensitivity = true 
)

Test if user is authorized for viewing a certain object.

Parameters:
$object_definition string object name, or array of names defining a "path"
$object_type string object type (host/service)
$case_sensitivity boolean

Reimplemented in User_NoAuth_Model.

User_Model::get_avatar_url ( size = 28  ) 

Retrieves the users avatar, currently this attempts to retrieve it from gravatar.

Parameters:
$size The size of the avatar image in pixels
Returns:
string The URL to access the avatar
User_Model::get_contact_groups (  ) 

List all contact groups I am a member of.

TODO: Deprecate? (this method is called from Nagvis)

Returns:
array array of groups

Reimplemented in User_NoAuth_Model.

User_Model::get_display_name (  ) 

Returns a display name of the user, i.e.

selects realname if set, otherwise the username

Returns:
string The display name
User_Model::get_last_login_time (  ) 

Returns the timestamp of this users last login or null if no time was found.

Returns:
mixed
User_Model::get_permission_regexp (  ) 

Return a regexp for matching a quark string for the current users access.

Returns:
string

Reimplemented in User_AlwaysAuth_Model.

User_Model::get_usergroups_set (  ) 

Get a set of all user groups for this user.

Returns:
UserGroupSet_Model
User_Model::getActorInfo (  ) 

Return information about the user, to be used as an actor in the MayI interface.

See also:
op5MayI_Actor::getActorInfo()
User_Model::has_logged_in (  ) 

Returns a boolean whether this user has logged in to the product before.

Returns:
bool
User_Model::logged_in (  ) 

Returns true if logged in.

Returns:
boolean always true (normal users are logged in, notauth overrides)

Reimplemented in User_AlwaysAuth_Model, and User_NoAuth_Model.

User_Model::set_password ( value  ) 

Autogenerated function.

Todo:
: documentation

Reimplemented from BaseUser_Model.

User_Model::validate (  )  [protected]

Autogenerated function.

Todo:
: documentation

Reimplemented from BaseUser_Model.


Field Documentation

User_Model::$export [protected]
Initial value:
 array(
                'username',
                'realname',
                'email',
                'modules',
                'auth_data',
                'auth_method',
                'groups'
        )

Autogenerated varible.

Todo:
: documentation

Reimplemented from BaseObject_Model.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1