modules/Groups/Group.php

Show: inherited
Table of Contents

\Group

Package:

SugarBean is the base class for all business objects in Sugar. It implements the primary functionality needed for manipulating business objects: create, retrieve, update, delete. It allows for searching and retrieving list of records.

It allows for retrieving related objects (e.g. contacts related to a specific account).

In the current implementation, there can only be one bean per folder. Naming convention has the bean name be the same as the module and folder name. All bean names should be singular (e.g. Contact). The primary table name for a bean should be plural (e.g. contacts).

Parent(s)
\User < \Person < \Basic < \SugarBean

Properties

Propertypublic  $_userPreferenceFocus= ''
inheritedInherited from: \User::$$_userPreferenceFocus
Details
Type
n/a
Inherited_from
\User::$$_userPreferenceFocus  
Propertypublic  $accept_status= ''
inheritedInherited from: \User::$$accept_status
Details
Type
n/a
Inherited_from
\User::$$accept_status  
Propertypublic  $acltype= ''module''
Default value'module'Details
Type
n/a
Inherited_from
\SugarBean::$$acltype  
Inherited_from
\Basic::$$acltype  
Inherited_from
\Person::$$acltype  
Inherited_from
\User::$$acltype  
Propertypublic  $additional_column_fields= 'array ('reports_to_name' )'
inheritedInherited from: \User::$$additional_column_fields
Default valuearray ('reports_to_name' )Details
Type
n/a
Inherited_from
\User::$$additional_column_fields  
Propertypublic  $additional_meta_fields= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarBean::$$additional_meta_fields  
Inherited_from
\Basic::$$additional_meta_fields  
Inherited_from
\Person::$$additional_meta_fields  
Inherited_from
\User::$$additional_meta_fields  
Propertypublic  $address_city= ''
inheritedInherited from: \User::$$address_city
Details
Type
n/a
Inherited_from
\User::$$address_city  
Propertypublic  $address_country= ''
inheritedInherited from: \User::$$address_country
Details
Type
n/a
Inherited_from
\User::$$address_country  
Propertypublic  $address_postalcode= ''
inheritedInherited from: \User::$$address_postalcode
Details
Type
n/a
Inherited_from
\User::$$address_postalcode  
Propertypublic  $address_state= ''
inheritedInherited from: \User::$$address_state
Details
Type
n/a
Inherited_from
\User::$$address_state  
Propertypublic  $address_street= ''
inheritedInherited from: \User::$$address_street
Details
Type
n/a
Inherited_from
\User::$$address_street  
Propertypublic  $authenticated= 'false'
inheritedInherited from: \User::$$authenticated
Default valuefalseDetails
Type
n/a
Inherited_from
\User::$$authenticated  
Propertypublic  $column_fields= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarBean::$$column_fields  
Inherited_from
\Basic::$$column_fields  
Inherited_from
\Person::$$column_fields  
Inherited_from
\User::$$column_fields  
Propertypublicbool  $createLocaleFormattedName= 'true'
inherited

controls whether or not to invoke the getLocalFormatttedName method with title and salutationInherited from: \Person::$$createLocaleFormattedName\User::$$createLocaleFormattedName
Default valuetrueDetails
Type
bool
Inherited_from
\Person::$$createLocaleFormattedName  
Inherited_from
\User::$$createLocaleFormattedName  
Propertypublic  $created_by= ''
inheritedInherited from: \User::$$created_by
Details
Type
n/a
Inherited_from
\User::$$created_by  
Propertypublic  $created_by_name= ''
inheritedInherited from: \User::$$created_by_name
Details
Type
n/a
Inherited_from
\User::$$created_by_name  
Propertypublic  $custom_fields= ''
Details
Type
n/a
Inherited_from
\SugarBean::$$custom_fields  
Inherited_from
\Basic::$$custom_fields  
Inherited_from
\Person::$$custom_fields  
Inherited_from
\User::$$custom_fields  
Propertypublic  $date_entered= ''
inheritedInherited from: \User::$$date_entered
Details
Type
n/a
Inherited_from
\User::$$date_entered  
Propertypublic  $date_modified= ''
inheritedInherited from: \User::$$date_modified
Details
Type
n/a
Inherited_from
\User::$$date_modified  
Propertypublic\DBManager  $db= ''
inherited

A pointer to the database object

Inherited from: \SugarBean::$$db\Basic::$$db\Person::$$db\User::$$db
Details
Type
\DBManager
Inherited_from
\SugarBean::$$db  
Inherited_from
\Basic::$$db  
Inherited_from
\Person::$$db  
Inherited_from
\User::$$db  
Propertypublic  $default_team= ''
Details
Type
n/a
PropertypublicBOOL  $deleted= '0'
inherited

true if this bean has been deleted, false otherwise.

Inherited from: \SugarBean::$$deleted\Basic::$$deleted\Person::$$deleted\User::$$deleted
Default value0Details
Type
BOOL
Inherited_from
\SugarBean::$$deleted  
Inherited_from
\Basic::$$deleted  
Inherited_from
\Person::$$deleted  
Inherited_from
\User::$$deleted  
Propertypublic  $department= ''
inheritedInherited from: \User::$$department
Details
Type
n/a
Inherited_from
\User::$$department  
Propertypublic  $description= ''
inheritedInherited from: \User::$$description
Details
Type
n/a
Inherited_from
\User::$$description  
Propertypublic  $disable_custom_fields= 'false'
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$disable_custom_fields  
Inherited_from
\Basic::$$disable_custom_fields  
Inherited_from
\Person::$$disable_custom_fields  
Inherited_from
\User::$$disable_custom_fields  
PropertypublicBOOL  $disable_vardefs= 'false'
inherited

Disble vardefs. This should be set to true only for beans that do not have varders. Tracker is an example

-- default falseInherited from: \SugarBean::$$disable_vardefs\Basic::$$disable_vardefs\Person::$$disable_vardefs\User::$$disable_vardefs
Default valuefalseDetails
Type
BOOL
Inherited_from
\SugarBean::$$disable_vardefs  
Inherited_from
\Basic::$$disable_vardefs  
Inherited_from
\Person::$$disable_vardefs  
Inherited_from
\User::$$disable_vardefs  
PropertypublicBOOL  $duplicates_found= 'false'
inherited

When running a query on related items using the method: retrieve_by_string_fields this value will be set to true if more than one item matches the search criteria.

Inherited from: \SugarBean::$$duplicates_found\Basic::$$duplicates_found\Person::$$duplicates_found\User::$$duplicates_found
Default valuefalseDetails
Type
BOOL
Inherited_from
\SugarBean::$$duplicates_found  
Inherited_from
\Basic::$$duplicates_found  
Inherited_from
\Person::$$duplicates_found  
Inherited_from
\User::$$duplicates_found  
Propertypublic  $email1= ''
inheritedInherited from: \User::$$email1
Details
Type
n/a
Inherited_from
\User::$$email1  
Propertypublic  $email2= ''
inheritedInherited from: \User::$$email2
Details
Type
n/a
Inherited_from
\User::$$email2  
Propertypublic  $emailAddress= ''
inheritedInherited from: \User::$$emailAddress
Details
Type
n/a
Inherited_from
\User::$$emailAddress  
Propertypublic  $employee_status= ''
inheritedInherited from: \User::$$employee_status
Details
Type
n/a
Inherited_from
\User::$$employee_status  
Propertypublic  $encodeFields= 'Array ("first_name", "last_name", "description")'
inheritedInherited from: \User::$$encodeFields
Default valueArray ("first_name", "last_name", "description")Details
Type
n/a
Inherited_from
\User::$$encodeFields  
Propertypublic  $error_string= ''
inheritedInherited from: \User::$$error_string
Details
Type
n/a
Inherited_from
\User::$$error_string  
Propertypublic  $fetched_row= 'false'
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$fetched_row  
Inherited_from
\Basic::$$fetched_row  
Inherited_from
\Person::$$fetched_row  
Inherited_from
\User::$$fetched_row  
Propertypublic  $field_defs= ''
Details
Type
n/a
Inherited_from
\SugarBean::$$field_defs  
Inherited_from
\Basic::$$field_defs  
Inherited_from
\Person::$$field_defs  
Inherited_from
\User::$$field_defs  
Propertypublic  $field_name_map= ''
Details
Type
n/a
Inherited_from
\SugarBean::$$field_name_map  
Inherited_from
\Basic::$$field_name_map  
Inherited_from
\Person::$$field_name_map  
Inherited_from
\User::$$field_name_map  
Propertypublic  $first_name= ''
inheritedInherited from: \User::$$first_name
Details
Type
n/a
Inherited_from
\User::$$first_name  
Propertypublic  $force_load_details= 'false'
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$force_load_details  
Inherited_from
\Basic::$$force_load_details  
Inherited_from
\Person::$$force_load_details  
Inherited_from
\User::$$force_load_details  
Propertypublic  $full_name= ''
inheritedInherited from: \User::$$full_name
Details
Type
n/a
Inherited_from
\User::$$full_name  
Propertypublic  $id= ''
inheritedInherited from: \User::$$id
Details
Type
n/a
Inherited_from
\User::$$id  
Propertypublic  $importable= 'false'

Set to true in the child beans if the module supports importing

Default valuefalseDetails
Type
n/a
Propertypublic  $in_import= 'false'
inherited

Set to true in <modules>/Import/views/view.step4.php if a module is being imported

Inherited from: \SugarBean::$$in_import\Basic::$$in_import\Person::$$in_import\User::$$in_import
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$in_import  
Inherited_from
\Basic::$$in_import  
Inherited_from
\Person::$$in_import  
Inherited_from
\User::$$in_import  
Propertypublic  $in_workflow= 'false'
inherited

Set to true if the bean is being dealt with in a workflow

Inherited from: \SugarBean::$$in_workflow\Basic::$$in_workflow\Person::$$in_workflow\User::$$in_workflow
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$in_workflow  
Inherited_from
\Basic::$$in_workflow  
Inherited_from
\Person::$$in_workflow  
Inherited_from
\User::$$in_workflow  
Propertypublic  $is_admin= ''
inheritedInherited from: \User::$$is_admin
Details
Type
n/a
Inherited_from
\User::$$is_admin  
Propertypublic  $is_group= ''
inheritedInherited from: \User::$$is_group
Details
Type
n/a
Inherited_from
\User::$$is_group  
Propertypublic  $last_name= ''
inheritedInherited from: \User::$$last_name
Details
Type
n/a
Inherited_from
\User::$$last_name  
Propertypublic  $layout_def= ''
Details
Type
n/a
Inherited_from
\SugarBean::$$layout_def  
Inherited_from
\Basic::$$layout_def  
Inherited_from
\Person::$$layout_def  
Inherited_from
\User::$$layout_def  
Propertypublic  $list_fields= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarBean::$$list_fields  
Inherited_from
\Basic::$$list_fields  
Inherited_from
\Person::$$list_fields  
Inherited_from
\User::$$list_fields  
Propertypublic  $listview_inner_join= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarBean::$$listview_inner_join  
Inherited_from
\Basic::$$listview_inner_join  
Inherited_from
\Person::$$listview_inner_join  
Inherited_from
\User::$$listview_inner_join  
Propertyprotectedarray  $loaded_relationships= 'array()'
inherited

A way to keep track of the loaded relationships so when we clone the object we can unset them.

Inherited from: \SugarBean::$$loaded_relationships\Basic::$$loaded_relationships\Person::$$loaded_relationships\User::$$loaded_relationships
Default valuearray()Details
Type
array
Inherited_from
\SugarBean::$$loaded_relationships  
Inherited_from
\Basic::$$loaded_relationships  
Inherited_from
\Person::$$loaded_relationships  
Inherited_from
\User::$$loaded_relationships  
Propertyprotectedint  $max_logic_depth= '10'
Default value10Details
Type
int
Inherited_from
\SugarBean::$$max_logic_depth  
Inherited_from
\Basic::$$max_logic_depth  
Inherited_from
\Person::$$max_logic_depth  
Inherited_from
\User::$$max_logic_depth  
Propertypublic  $messenger_id= ''
inheritedInherited from: \User::$$messenger_id
Details
Type
n/a
Inherited_from
\User::$$messenger_id  
Propertypublic  $messenger_type= ''
inheritedInherited from: \User::$$messenger_type
Details
Type
n/a
Inherited_from
\User::$$messenger_type  
Propertypublic  $modified_by_name= ''
inheritedInherited from: \User::$$modified_by_name
Details
Type
n/a
Inherited_from
\User::$$modified_by_name  
Propertypublic  $modified_user_id= ''
inheritedInherited from: \User::$$modified_user_id
Details
Type
n/a
Inherited_from
\User::$$modified_user_id  
PropertypublicString  $module_dir= ''Users''
inherited

The name of the module folder for this type of bean.

Inherited from: \User::$$module_dir
Default value'Users'Details
Type
String
Inherited_from
\User::$$module_dir  
Propertypublic  $module_name= ''''
Default value''Details
Type
n/a
Inherited_from
\SugarBean::$$module_name  
Inherited_from
\Basic::$$module_name  
Inherited_from
\Person::$$module_name  
Inherited_from
\User::$$module_name  
Propertypublic  $name= ''''
inheritedInherited from: \User::$$name
Default value''Details
Type
n/a
Inherited_from
\User::$$name  
PropertypublicString  $new_assigned_user_name= ''
inherited

holds the full name of the user that an item is assigned to. Only used if notifications are turned on and going to be sent out.

Inherited from: \SugarBean::$$new_assigned_user_name\Basic::$$new_assigned_user_name\Person::$$new_assigned_user_name\User::$$new_assigned_user_name
Details
Type
String
Inherited_from
\SugarBean::$$new_assigned_user_name  
Inherited_from
\Basic::$$new_assigned_user_name  
Inherited_from
\Person::$$new_assigned_user_name  
Inherited_from
\User::$$new_assigned_user_name  
Propertypublic  $new_schema= 'true'
inheritedInherited from: \User::$$new_schema
Default valuetrueDetails
Type
n/a
Inherited_from
\User::$$new_schema  
PropertypublicBOOL  $new_with_id= 'false'
inherited

When createing a bean, you can specify a value in the id column as long as that value is unique. During save, if the system finds an id, it assumes it is an update. Setting new_with_id to true will make sure the system performs an insert instead of an update.

-- default falseInherited from: \SugarBean::$$new_with_id\Basic::$$new_with_id\Person::$$new_with_id\User::$$new_with_id
Default valuefalseDetails
Type
BOOL
Inherited_from
\SugarBean::$$new_with_id  
Inherited_from
\Basic::$$new_with_id  
Inherited_from
\Person::$$new_with_id  
Inherited_from
\User::$$new_with_id  
PropertypublicString  $object_name= '"User"'
inherited

This is the singular name of the bean. (i.e. Contact).

Inherited from: \User::$$object_name
Default value"User"Details
Type
String
Inherited_from
\User::$$object_name  
Propertypublic  $optimistic_lock= 'false'
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$optimistic_lock  
Inherited_from
\Basic::$$optimistic_lock  
Inherited_from
\Person::$$optimistic_lock  
Inherited_from
\User::$$optimistic_lock  
Propertypublic  $password= ''''
Default value''Details
Type
n/a
Propertypublic  $phone_fax= ''
inheritedInherited from: \User::$$phone_fax
Details
Type
n/a
Inherited_from
\User::$$phone_fax  
Propertypublic  $phone_home= ''
inheritedInherited from: \User::$$phone_home
Details
Type
n/a
Inherited_from
\User::$$phone_home  
Propertypublic  $phone_mobile= ''
inheritedInherited from: \User::$$phone_mobile
Details
Type
n/a
Inherited_from
\User::$$phone_mobile  
Propertypublic  $phone_other= ''
inheritedInherited from: \User::$$phone_other
Details
Type
n/a
Inherited_from
\User::$$phone_other  
Propertypublic  $phone_work= ''
inheritedInherited from: \User::$$phone_work
Details
Type
n/a
Inherited_from
\User::$$phone_work  
Propertypublic  $picture= ''
inheritedInherited from: \Person::$$picture\User::$$picture
Details
Type
n/a
Inherited_from
\Person::$$picture  
Inherited_from
\User::$$picture  
Propertypublic  $portal_only= ''
inheritedInherited from: \User::$$portal_only
Details
Type
n/a
Inherited_from
\User::$$portal_only  
PropertypublicBOOL  $process_save_dates= 'true'
inherited

Whether to process date/time fields for storage in the database in GMT

Inherited from: \SugarBean::$$process_save_dates\Basic::$$process_save_dates\Person::$$process_save_dates\User::$$process_save_dates
Default valuetrueDetails
Type
BOOL
Inherited_from
\SugarBean::$$process_save_dates  
Inherited_from
\Basic::$$process_save_dates  
Inherited_from
\Person::$$process_save_dates  
Inherited_from
\User::$$process_save_dates  
PropertypublicArray  $processed_dates_times= 'array()'
inherited

An array of booleans. This array is cleared out when data is loaded.

of booleansInherited from: \SugarBean::$$processed_dates_times\Basic::$$processed_dates_times\Person::$$processed_dates_times\User::$$processed_dates_times

As date/times are converted, a "1" is placed under the key, the field is converted.

Default valuearray()Details
Type
Array
Inherited_from
\SugarBean::$$processed_dates_times  
Inherited_from
\Basic::$$processed_dates_times  
Inherited_from
\Person::$$processed_dates_times  
Inherited_from
\User::$$processed_dates_times  
Propertypublic  $receive_notifications= ''
inheritedInherited from: \User::$$receive_notifications
Details
Type
n/a
Inherited_from
\User::$$receive_notifications  
Propertypublic  $relationship_fields= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarBean::$$relationship_fields  
Inherited_from
\Basic::$$relationship_fields  
Inherited_from
\Person::$$relationship_fields  
Inherited_from
\User::$$relationship_fields  
Propertypublic  $reports_to_id= ''
inheritedInherited from: \User::$$reports_to_id
Details
Type
n/a
Inherited_from
\User::$$reports_to_id  
Propertypublic  $reports_to_name= ''
inheritedInherited from: \User::$$reports_to_name
Details
Type
n/a
Inherited_from
\User::$$reports_to_name  
Propertypublic  $salutation= ''
inheritedInherited from: \User::$$salutation
Details
Type
n/a
Inherited_from
\User::$$salutation  
PropertypublicBOOL  $save_from_post= 'true'
inherited

This signals to the bean that it is being saved in a mass mode.

Inherited from: \SugarBean::$$save_from_post\Basic::$$save_from_post\Person::$$save_from_post\User::$$save_from_post

Examples of this kind of save are import and mass update. We turn off notificaitons of this is the case to make things more efficient.

Default valuetrueDetails
Type
BOOL
Inherited_from
\SugarBean::$$save_from_post  
Inherited_from
\Basic::$$save_from_post  
Inherited_from
\Person::$$save_from_post  
Inherited_from
\User::$$save_from_post  
Propertypublic\unknown_type  $set_created_by= 'true'
inherited

This allows for seed data to be created without using the current uesr to set the id.

Inherited from: \SugarBean::$$set_created_by\Basic::$$set_created_by\Person::$$set_created_by\User::$$set_created_by

This should be replaced by altering the current user before the call to save.

Default valuetrueDetails
Type
\unknown_type
Inherited_from
\SugarBean::$$set_created_by  
Inherited_from
\Basic::$$set_created_by  
Inherited_from
\Person::$$set_created_by  
Inherited_from
\User::$$set_created_by  
Propertypublic  $special_notification= 'false'
inherited

Set to true in the child beans if the module use the special notification template

Inherited from: \SugarBean::$$special_notification\Basic::$$special_notification\Person::$$special_notification\User::$$special_notification
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$special_notification  
Inherited_from
\Basic::$$special_notification  
Inherited_from
\Person::$$special_notification  
Inherited_from
\User::$$special_notification  
Propertypublic  $status= ''Group''
Default value'Group'Details
Type
n/a
PropertypublicString  $table_name= '"users"'
inherited

The database table where records of this Bean are stored.

Inherited from: \User::$$table_name
Default value"users"Details
Type
String
Inherited_from
\User::$$table_name  
Propertypublic  $team_exists= 'false'
inheritedInherited from: \User::$$team_exists
Default valuefalseDetails
Type
n/a
Inherited_from
\User::$$team_exists  
Propertypublic  $team_id= ''
inheritedInherited from: \User::$$team_id
Details
Type
n/a
Inherited_from
\User::$$team_id  
Propertypublic  $team_set_id= ''
Details
Type
n/a
Inherited_from
\SugarBean::$$team_set_id  
Inherited_from
\Basic::$$team_set_id  
Inherited_from
\Person::$$team_set_id  
Inherited_from
\User::$$team_set_id  
Propertypublic  $title= ''
inheritedInherited from: \User::$$title
Details
Type
n/a
Inherited_from
\User::$$title  
Propertypublic  $tracker_visibility= 'true'
inherited

By default it will be true but if any module is to be kept non visible to tracker, then its value needs to be overriden in that particular module to false.

Inherited from: \SugarBean::$$tracker_visibility\Basic::$$tracker_visibility\Person::$$tracker_visibility\User::$$tracker_visibility
Default valuetrueDetails
Type
n/a
Inherited_from
\SugarBean::$$tracker_visibility  
Inherited_from
\Basic::$$tracker_visibility  
Inherited_from
\Person::$$tracker_visibility  
Inherited_from
\User::$$tracker_visibility  
Propertypublic  $ungreedy_count= 'false'
inherited

Set this to true if you query contains a sub-select and bean is converting both select statements into count queries.

Inherited from: \SugarBean::$$ungreedy_count\Basic::$$ungreedy_count\Person::$$ungreedy_count\User::$$ungreedy_count
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarBean::$$ungreedy_count  
Inherited_from
\Basic::$$ungreedy_count  
Inherited_from
\Person::$$ungreedy_count  
Inherited_from
\User::$$ungreedy_count  
PropertypublicBOOL  $update_date_entered= 'false'
inherited

Setting this to true allows for updates to overwrite the date_entered

Inherited from: \SugarBean::$$update_date_entered\Basic::$$update_date_entered\Person::$$update_date_entered\User::$$update_date_entered
Default valuefalseDetails
Type
BOOL
Inherited_from
\SugarBean::$$update_date_entered  
Inherited_from
\Basic::$$update_date_entered  
Inherited_from
\Person::$$update_date_entered  
Inherited_from
\User::$$update_date_entered  
PropertypublicBOOL  $update_date_modified= 'true'
inherited

Should the date modified column of the bean be updated during save? This is used for admin level functionality that should not be updating the date modified. This is only used by sync to allow for updates to be replicated in a way that will not cause them to be replicated back.

Inherited from: \SugarBean::$$update_date_modified\Basic::$$update_date_modified\Person::$$update_date_modified\User::$$update_date_modified
Default valuetrueDetails
Type
BOOL
Inherited_from
\SugarBean::$$update_date_modified  
Inherited_from
\Basic::$$update_date_modified  
Inherited_from
\Person::$$update_date_modified  
Inherited_from
\User::$$update_date_modified  
PropertypublicBOOL  $update_modified_by= 'true'
inherited

Should the modified by column of the bean be updated during save? This is used for admin level functionality that should not be updating the modified by column. This is only used by sync to allow for updates to be replicated in a way that will not cause them to be replicated back.

Inherited from: \SugarBean::$$update_modified_by\Basic::$$update_modified_by\Person::$$update_modified_by\User::$$update_modified_by
Default valuetrueDetails
Type
BOOL
Inherited_from
\SugarBean::$$update_modified_by  
Inherited_from
\Basic::$$update_modified_by  
Inherited_from
\Person::$$update_modified_by  
Inherited_from
\User::$$update_modified_by  
Propertypublic  $user_hash= ''
inheritedInherited from: \User::$$user_hash
Details
Type
n/a
Inherited_from
\User::$$user_hash  
Propertypublic  $user_name= ''
inheritedInherited from: \User::$$user_name
Details
Type
n/a
Inherited_from
\User::$$user_name  
Propertypublic  $user_preferences= ''
inheritedInherited from: \User::$$user_preferences
Details
Type
n/a
Inherited_from
\User::$$user_preferences  

Methods

methodpublicACLAccess( \$view $view, \$is_owner $is_owner = 'not_set' ) : void
inherited

Check whether the user has access to a particular view for the current bean/module

Inherited from: \SugarBean::ACLAccess()\Basic::ACLAccess()\Person::ACLAccess()\User::ACLAccess()
Parameters
Name Type Description
$view \$view

string required, the view to determine access for i.e. DetailView, ListView...

$is_owner \$is_owner

bool optional, this is part of the ACL check if the current user is an owner they will receive different access

methodpublicBasic( ) : void
inherited

Constructor

Inherited from: \Basic::Basic()\Person::Basic()\User::Basic()
methodpublicGroup( ) : void

methodpublicPerson( ) : void
inherited

Inherited from: \Person::Person()\User::Person()
methodpublicSugarBean( ) : void
inherited

Constructor for the bean, it performs following tasks:

Inherited from: \SugarBean::SugarBean()\Basic::SugarBean()\Person::SugarBean()\User::SugarBean()
  1. Initalized a database connections
  2. Load the vardefs for the module implemeting the class. cache the entries if needed
  3. Setup row-level security preference All implementing classes must call this constructor using the parent::SugarBean() class.
methodpublicUser( ) : void
inherited

Inherited from: \User::User()
methodpublic__clone( ) : void
inherited

Handle the following when a SugarBean object is cloned

Inherited from: \SugarBean::__clone()\Basic::__clone()\Person::__clone()\User::__clone()

Currently all this does it unset any relationships that were created prior to cloning the object

Details
Api
 
methodprivate_checkOptimisticLocking(  $action,  $isUpdate ) : void
inherited

Moved from save() method, functionality is the same, but this is intended to handle Optimistic locking functionality.

Inherited from: \SugarBean::_checkOptimisticLocking()\Basic::_checkOptimisticLocking()\Person::_checkOptimisticLocking()\User::_checkOptimisticLocking()
Parameters
Name Type Description
$action
$isUpdate
methodpublic_create_proper_name_field( ) : void
inherited

This function helps generate the name and full_name member field variables from the salutation, title, first_name and last_name fields.

Inherited from: \Person::_create_proper_name_field()\User::_create_proper_name_field()

It takes into account the locale format settings as well as ACL settings if supported.

methodprotected_fixupModuleForACL(  $module ) : string
inherited

Helper function to remap some modules around ACL wise

Inherited from: \User::_fixupModuleForACL()
Parameters
Name Type Description
$module
Returns
Type Description
string
methodprotected_getModulesForACL(  $type = 'dev' ) : array
inherited

Helper function that enumerates the list of modules and checks if they are an admin/dev.

Inherited from: \User::_getModulesForACL()

The code was just too similar to copy and paste.

Parameters
Name Type Description
$type
Returns
Type Description
array
methodpublic_get_num_rows_in_query( string $query, boolean $is_count_query = false ) : int
inherited

Returns the number of rows that the given SQL query should produce

Inherited from: \SugarBean::_get_num_rows_in_query()\Basic::_get_num_rows_in_query()\Person::_get_num_rows_in_query()\User::_get_num_rows_in_query()

Internal function, do not override.

Parameters
Name Type Description
$query string

valid select query

$is_count_query boolean

Optional, Default false, set to true if passed query is a count query.

Returns
Type Description
int count of rows found
methodprivate_loadCachedArray( \$module_dir $module_dir, \$module $module, \$key $key ) : void
inherited

This function is designed to cache references to field arrays that were previously stored in the bean files and have since been moved to separate files. Was previously in include/CacheHandler.php

Inherited from: \SugarBean::_loadCachedArray()\Basic::_loadCachedArray()\Person::_loadCachedArray()\User::_loadCachedArray()
Parameters
Name Type Description
$module_dir \$module_dir

string the module directory

$module \$module

string the name of the module

$key \$key

string the type of field array we are referencing, i.e. list_fields, column_fields, required_fields

methodprotected_loadUserPreferencesFocus( ) : void
inherited

Inherited from: \User::_loadUserPreferencesFocus()
methodprivate_sendNotifications(  $check_notify ) : void
inherited

Send assignment notifications and invites for meetings and calls

Inherited from: \SugarBean::_sendNotifications()\Basic::_sendNotifications()\Person::_sendNotifications()\User::_sendNotifications()
Parameters
Name Type Description
$check_notify
methodpublicadd_address_streets( string $street_field ) : void
inherited

Combined the contents of street field 2 thru 4 into the main field

Inherited from: \SugarBean::add_address_streets()\Basic::add_address_streets()\Person::add_address_streets()\User::add_address_streets()
Parameters
Name Type Description
$street_field string
methodpublicadd_list_count_joins( string $query, string $where ) : void
inherited

Add any required joins to the list count query. The joins are required if there is a field in the $where clause that needs to be joined.

Inherited from: \SugarBean::add_list_count_joins()\Basic::add_list_count_joins()\Person::add_list_count_joins()\User::add_list_count_joins()
Parameters
Name Type Description
$query string
$where string

Internal Function, do Not override.

methodpublicafterImportSave( ) : void
inherited

Called during the import process after a bean save, to handle any needed post-save logic when importing a record

Inherited from: \User::afterImportSave()
methodpublicassign_display_fields(  $currentModule ) : void
Parameters
Name Type Description
$currentModule
methodpublicauthenticate_user( string $password ) : bool
inherited

Authenicates the user; returns true if successful

Inherited from: \User::authenticate_user()
Parameters
Name Type Description
$password string

MD5-encoded password

Returns
Type Description
bool
methodpublicbean_implements(  $interface ) : void
inherited

Inherited from: \User::bean_implements()
Parameters
Name Type Description
$interface
methodpublicbeforeImportSave( ) : void
inherited

Called during the import process before a bean save, to handle any needed pre-save logic when importing a record

Inherited from: \SugarBean::beforeImportSave()\Basic::beforeImportSave()\Person::beforeImportSave()\User::beforeImportSave()
methodpublicbuild_generic_where_clause(  $value ) : void
inherited

Override this function to build a where clause based on the search criteria set into bean .

Inherited from: \SugarBean::build_generic_where_clause()\Basic::build_generic_where_clause()\Person::build_generic_where_clause()\User::build_generic_where_clause()
Parameters
Name Type Description
$value
Details
Abstract
 
methodpublicbuild_related_in( string $query ) : void
inherited

Constructs an comma separated list of ids from passed query results.

Inherited from: \SugarBean::build_related_in()\Basic::build_related_in()\Person::build_related_in()\User::build_related_in()
Parameters
Name Type Description
$query string

@query query to be executed.

methodpublicbuild_related_list( string $query, object $template, int $row_offset = 0, int $limit = -1 ) : array
inherited

This function is used to execute the query and create an array template objects from the resulting ids from the query.

Inherited from: \SugarBean::build_related_list()\Basic::build_related_list()\Person::build_related_list()\User::build_related_list()

It is currently used for building sub-panel arrays.

Parameters
Name Type Description
$query string
  • the query that should be executed to build the list
$template object
  • The object that should be used to copy the records.
$row_offset int

Optional, default 0

$limit int

Optional, default -1

Returns
Type Description
array
methodpublicbuild_related_list2( string $query, object $template, array $field_list ) : array
inherited

Optionally copies values from fetched row into the bean.

Inherited from: \SugarBean::build_related_list2()\Basic::build_related_list2()\Person::build_related_list2()\User::build_related_list2()

Internal function, do not override.

Parameters
Name Type Description
$query string
  • the query that should be executed to build the list
$template object
  • The object that should be used to copy the records
$field_list array

List of fields.

Returns
Type Description
array
methodpublicbuild_related_list_where( string $query, object $template,  $where = '',  $in = '',  $order_by,  $limit = '',  $row_offset = 0 ) : void
inherited

This function is used to execute the query and create an array template objects from the resulting ids from the query.

Inherited from: \SugarBean::build_related_list_where()\Basic::build_related_list_where()\Person::build_related_list_where()\User::build_related_list_where()

It is currently used for building sub-panel arrays. It supports an additional where clause that is executed as a filter on the results

Parameters
Name Type Description
$query string
  • the query that should be executed to build the list
$template object
  • The object that should be used to copy the records.
$where
$in
$order_by
$limit
$row_offset
methodprotectedbuild_sub_queries_for_union(  $subpanel_list,  $subpanel_def,  $parentbean,  $order_by ) : void
Parameters
Name Type Description
$subpanel_list
$subpanel_def
$parentbean
$order_by
methodpubliccall_custom_logic(  $event,  $arguments = null ) : void
inherited

Trigger custom logic for this module that is defined for the provided hook The custom logic file is located under custom/modules/[CURRENT_MODULE]/logic_hooks.php.

Inherited from: \SugarBean::call_custom_logic()\Basic::call_custom_logic()\Person::call_custom_logic()\User::call_custom_logic()

That file should define the $hook_version that should be used. It should also define the $hook_array. The $hook_array will be a two dimensional array the first dimension is the name of the event, the second dimension is the information needed to fire the hook. Each entry in the top level array should be defined on a single line to make it easier to automatically replace this file. There should be no contents of this file that are not replacable.

$hook_array['before_save'][] = Array(1, testtype, 'custom/modules/Leads/test12.php', 'TestClass', 'lead_before_save_1'); This sample line creates a before_save hook. The hooks are procesed in the order in which they are added to the array. The second dimension is an array of: processing index (for sorting before exporting the array) A logic type hook label/type php file to include php class the method is in php method to call

The method signature for version 1 hooks is: function NAME(&$bean, $event, $arguments) $bean - $this bean passed in by reference. $event - The string for the current event (i.e. before_save) $arguments - An array of arguments that are specific to the event.

Parameters
Name Type Description
$event
$arguments
methodpublicchange_password( string $user_password, string $new_password,  $system_generated = '0' ) : boolean
inherited

Verify that the current password is correct and write the new password to the DB.

Inherited from: \User::change_password()
Parameters
Name Type Description
$user_password string
  • Must be non null and at least 1 character.
$new_password string
  • Must be non null and at least 1 character.
$system_generated
Returns
Type Description
boolean - If passwords pass verification and query succeeds, return true, else return false.
methodpubliccheckPassword( string $password, string $user_hash ) : void
staticinherited

Check that password matches existing hash

Inherited from: \User::checkPassword()
Parameters
Name Type Description
$password string

Plaintext password

$user_hash string

DB hash

methodpubliccheckPasswordMD5(  $password_md5, string $user_hash ) : bool
staticinherited

Check that md5-encoded password matches existing hash

Inherited from: \User::checkPasswordMD5()
Parameters
Name Type Description
$password_md5
$user_hash string

DB hash

Returns
Type Description
bool Match or not?
methodpubliccheck_date_relationships_load( ) : \this

It fills in all of the fields from the DB into the object it was called on.

Returns
Type Description
\this - The object that it was called apon or null if exactly 1 record was not found.
methodpubliccheck_password_rules( string $password ) : boolean
inherited

Check new password against rules set by admin

Inherited from: \User::check_password_rules()
Parameters
Name Type Description
$password string
Returns
Type Description
boolean
methodpubliccheck_role_membership( string $role_name, string $user_id = '' ) : boolean
inherited

Inherited from: \User::check_role_membership()
Parameters
Name Type Description
$role_name string
  • Must be the exact name of the acl_role
$user_id string
  • The user id to check for the role membership, empty string if current user
Returns
Type Description
boolean true if the user is a member of the role_name, false otherwise
Details
Desc
Determine whether or not a user is a member of an ACL Role. This function caches the results in the session or to prevent running queries after the first time executed. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. All Rights Reserved.. Contributor(s): ______________________________________..  
methodpubliccleanBean( ) : void
inherited

Cleans char, varchar, text, etc. fields of XSS type materials

Inherited from: \SugarBean::cleanBean()\Basic::cleanBean()\Person::cleanBean()\User::cleanBean()
methodpublicconvertField(  $fieldvalue,  $fieldDef ) : string
inherited

Converts the field value based on the provided fieldDef

Inherited from: \SugarBean::convertField()\Basic::convertField()\Person::convertField()\User::convertField()
Parameters
Name Type Description
$fieldvalue
$fieldDef
Returns
Type Description
string
methodpublicconvertRow( array $row ) : array
inherited

Convert row data from DB format to internal format Mostly useful for dates/times

Inherited from: \SugarBean::convertRow()\Basic::convertRow()\Person::convertRow()\User::convertRow()
Parameters
Name Type Description
$row array
Returns
Type Description
array $row
methodpubliccreateRelationshipMeta( string $key, object $db, string $tablename, array $dictionary, string $module_dir, boolean $iscustom = false ) : void

It is called during setup/install. It is used statically to create relationship meta data for many-to-many tables.

Parameters
Name Type Description
$key string

name of the object.

$db object

database handle.

$tablename string

table, meta data is being populated for.

$dictionary array

dictionary vardef dictionary for the object. *

$module_dir string

module_dir name of subdirectory where module is installed.

$iscustom boolean

Optional,set to true if module is installed in a custom directory. Default value is false.

Details
Static
Internal function, do not override.  
methodpubliccreate_audit_table( ) : void

Function is used by the install scripts and a repair utility in the admin panel.

Internal function, do not override.

methodpubliccreate_export_query( string $order_by, string $where ) : string

Returns the query used for the export functionality for a module. Override this method if you wish to have a custom query to pull this data together instead

Parameters
Name Type Description
$order_by string
$where string
Returns
Type Description
string SQL query
methodpubliccreate_index(  $query ) : void
inherited

This is a helper function that is used to quickly created indexes when creating tables.

Inherited from: \SugarBean::create_index()\Basic::create_index()\Person::create_index()\User::create_index()
Parameters
Name Type Description
$query
methodpubliccreate_list_count_query( string $query ) : string
inherited

Changes the select expression of the given query to be 'count(*)' so you can get the number of items the query will return. This is used to populate the upper limit on ListViews.

Inherited from: \SugarBean::create_list_count_query()\Basic::create_list_count_query()\Person::create_list_count_query()\User::create_list_count_query()
Parameters
Name Type Description
$query string

Select query string

Returns
Type Description
string count query Internal function, do not override.
methodpubliccreate_new_list_query( string $order_by, string $where, array $filter = array(), array $params = array(), int $show_deleted = 0, string $join_type = '', boolean $return_array = false, object $parentbean = null, boolean $singleSelect = false ) : String
inherited

Return the list query used by the list views and export button. Next generation of create_new_list_query function.

Inherited from: \User::create_new_list_query()

Override this function to return a custom query.

Parameters
Name Type Description
$order_by string

custom order by clause

$where string

custom where clause

$filter array

Optioanal

$params array

Optional *

$show_deleted int

Optional, default 0, show deleted records is set to 1.

$join_type string
$return_array boolean

Optional, default false, response as array

$parentbean object

creating a subquery for this bean.

$singleSelect boolean

Optional, default false.

Returns
Type Description
String select query string, optionally an array value will be returned if $return_array= true.
methodpubliccreate_notification_email( string $notify_user ) : void
Parameters
Name Type Description
$notify_user string

the user to send the notification email to

methodpubliccreate_qualified_order_by( string $order_by, string $qualify ) : \prefixed
inherited

Ensure that fields within order by clauses are properly qualified with their tablename. This qualification is a requirement for sql server support.

Inherited from: \SugarBean::create_qualified_order_by()\Basic::create_qualified_order_by()\Person::create_qualified_order_by()\User::create_qualified_order_by()
Parameters
Name Type Description
$order_by string

original order by from the query

$qualify string

prefix for columns in the order by list.

Returns
Type Description
\prefixed Internal function do not override.
methodpubliccreate_relationship_meta(  $key,  $db,  $log,  $tablename,  $dictionary,  $module_dir ) : void
Parameters
Name Type Description
$key
$db
$log
$tablename
$dictionary
$module_dir
Details
See
\createRelationshipMeta()  
Static
 
methodpubliccreate_tables( ) : void
inherited

Creates tables for the module implementing the class.

Inherited from: \SugarBean::create_tables()\Basic::create_tables()\Person::create_tables()\User::create_tables()

If you override this function make sure that your code can handles table creation.

methodpublicdecrypt_after_retrieve( STRING $value ) : string
inherited

Decode and decrypt a base 64 encoded string with field type 'encrypt' in this bean using Blowfish.

Inherited from: \SugarBean::decrypt_after_retrieve()\Basic::decrypt_after_retrieve()\Person::decrypt_after_retrieve()\User::decrypt_after_retrieve()
Parameters
Name Type Description
$value STRING

value - an encrypted and base 64 encoded string.

Returns
Type Description
string
methodpublicdelete_linked( string $id ) : void
inherited

Iterates through all the relationships and deletes all records for reach relationship.

Inherited from: \SugarBean::delete_linked()\Basic::delete_linked()\Person::delete_linked()\User::delete_linked()
Parameters
Name Type Description
$id string

Primary key value of the parent reocrd

methodpublicdisplayEmailCounts( ) : void
inherited

generates Javascript to display I-E mail counts, both personal and group

Inherited from: \User::displayEmailCounts()
methodpublicdrop_tables( ) : void
inherited

Delete the primary table for the module implementing the class.

Inherited from: \SugarBean::drop_tables()\Basic::drop_tables()\Person::drop_tables()\User::drop_tables()

If custom fields were added to this table/module, the custom table will be removed too, along with the cache entries that define the custom fields.

methodpublicencrpyt_before_save( STRING $value ) : string
inherited

Encrpyt and base64 encode an 'encrypt' field type in the bean using Blowfish. The default system key is stored in cache/Blowfish/{keytype}

Inherited from: \SugarBean::encrpyt_before_save()\Basic::encrpyt_before_save()\Person::encrpyt_before_save()\User::encrpyt_before_save()
Parameters
Name Type Description
$value STRING

value -plain text value of the bean field.

Returns
Type Description
string
methodpublicencrypt_password( string $user_password ) : string
inherited

Inherited from: \User::encrypt_password()
Parameters
Name Type Description
$user_password string
  • Must be non null and at least 1 character.
Returns
Type Description
string encrypted password for storage in DB and comparison against DB password.
Details
Desc
Take an unencrypted username and password and return the encrypted password  
methodpublicfill_in_additional_detail_fields( ) : void
inherited

This is designed to be overridden and add specific fields to each record.

Inherited from: \User::fill_in_additional_detail_fields()

This allows the generic query to fill in the major fields, and then targeted queries to get related fields and add them to the record. The contact's account for instance. This method is only used for populating extra fields in the detail form

methodpublicfill_in_additional_list_fields( ) : void
inherited

This is designed to be overridden and add specific fields to each record.

Inherited from: \User::fill_in_additional_list_fields()

This allows the generic query to fill in the major fields, and then targeted queries to get related fields and add them to the record. The contact's account for instance. This method is only used for populating extra fields in lists.

methodpublicfill_in_additional_parent_fields( ) : void
inherited

This is desgined to be overridden or called from extending bean. This method will fill in any parent_name fields.

Inherited from: \SugarBean::fill_in_additional_parent_fields()\Basic::fill_in_additional_parent_fields()\Person::fill_in_additional_parent_fields()\User::fill_in_additional_parent_fields()
methodpublicfill_in_link_field(  $linkFieldName,  $def ) : void
Parameters
Name Type Description
$linkFieldName
$def
methodpublicfill_in_relationship_fields( ) : void
inherited

Populate email address fields here instead of retrieve() so that they are properly available for logic hooks

Inherited from: \Person::fill_in_relationship_fields()\User::fill_in_relationship_fields()
Details
See
\parent::fill_in_relationship_fields()  
methodpublicfindUserPassword( string $name, string $password, string $where = '' ) : \the
staticinherited

Find user with matching password

Inherited from: \User::findUserPassword()
Parameters
Name Type Description
$name string

Username

$password string

MD5-encoded password

$where string

Limiting query

Returns
Type Description
\the matching User of false if not found
methodpublicfixUpFormatting( ) : void
inherited

Function corrects any bad formatting done by 3rd party/custom code

Inherited from: \SugarBean::fixUpFormatting()\Basic::fixUpFormatting()\Person::fixUpFormatting()\User::fixUpFormatting()

This function will be removed in a future release, it is only here to assist upgrading existing code that expects formatted data in the bean

methodpublicformat_all_fields( ) : void
inherited

This functions adds formatting to all number fields before presenting them to user interface.

Inherited from: \SugarBean::format_all_fields()\Basic::format_all_fields()\Person::format_all_fields()\User::format_all_fields()

Internal function, do not override.

methodpublicformat_field(  $fieldDef ) : void
Parameters
Name Type Description
$fieldDef
methodpublicfromArray( Array $arr ) : void
inherited

Converts an array into an acl mapping name value pairs into files

Inherited from: \SugarBean::fromArray()\Basic::fromArray()\Person::fromArray()\User::fromArray()
Parameters
Name Type Description
$arr Array
methodpublicgeneratePassword( ) : string
staticinherited

Method for password generation

Inherited from: \User::generatePassword()
Returns
Type Description
string password
Details
Static
 
methodpublicgetACLCategory( ) : string
inherited

Returns the ACL category for this module; defaults to the SugarBean::$acl_category if defined otherwise it is SugarBean::$module_dir

Inherited from: \SugarBean::getACLCategory()\Basic::getACLCategory()\Person::getACLCategory()\User::getACLCategory()
Returns
Type Description
string
methodpublicgetAdminModules( ) : array
inherited

List the modules a user has admin access to

Inherited from: \User::getAdminModules()
Returns
Type Description
array
methodpublicgetAllUsers( ) : Array
staticinherited

getAllUsers

Inherited from: \User::getAllUsers()

Returns all active and inactive users

Returns
Type Description
Array of all users in the system
methodpublicgetAuditEnabledFieldDefinitions( ) : \an
inherited

Returns a list of fields with their definitions that have the audited property set to true.

Inherited from: \SugarBean::getAuditEnabledFieldDefinitions()\Basic::getAuditEnabledFieldDefinitions()\Person::getAuditEnabledFieldDefinitions()\User::getAuditEnabledFieldDefinitions()

Before calling this function, check whether audit has been enabled for the table/module or not. You would set the audit flag in the implemting module's vardef file.

Returns
Type Description
\an array of
Details
See
\is_AuditEnabled  
methodpublicgetDefaultSignature( ) : void
inherited

convenience function to get user's default signature

Inherited from: \User::getDefaultSignature()
methodpublicgetDeveloperModules( ) : array
inherited

List the modules a user has developer access to

Inherited from: \User::getDeveloperModules()
Returns
Type Description
array
methodpublicgetETagSeed( string $tag ) : integer
inherited

getETagSeed

Inherited from: \User::getETagSeed()

This function is a wrapper to encapsulate getting the ETag seed and making sure it's sanitized for use in the app.

Parameters
Name Type Description
$tag string

ETag seed name.

Returns
Type Description
integer numeric value of the seed
methodpublicgetEmailInfo( string $id = '' ) : array
inherited

returns User's email address based on descending order of preferences

Inherited from: \User::getEmailInfo()
Parameters
Name Type Description
$id string

id GUID of target user if needed

Returns
Type Description
array Assoc array for an email and name
methodpublicgetEmailLink( \attribute $attribute, \focus $focus,  $contact_id = '',  $ret_module = '',  $ret_action = 'DetailView',  $ret_id = '',  $class = '' ) : string
inherited

returns opening Inherited from: \User::getEmailLink()

Parameters
Name Type Description
$attribute \attribute

the email addy

$focus \focus

the parent bean

$contact_id

contact_id

$ret_module

return_module

$ret_action

return_action

$ret_id

return_id

$class

class

Returns
Type Description
string link
methodpublicgetEmailLink2( \attribute $emailAddress, \focus $focus,  $contact_id = '',  $ret_module = '',  $ret_action = 'DetailView',  $ret_id = '',  $class = '' ) : string
inherited

returns opening Inherited from: \User::getEmailLink2()

Parameters
Name Type Description
$emailAddress \attribute

the email addy

$focus \focus

the parent bean

$contact_id

contact_id

$ret_module

return_module

$ret_action

return_action

$ret_id

return_id

$class

class

Returns
Type Description
string link
methodpublicgetFieldDefinition( string $name ) : Array
inherited

Returns field definition for the requested field name.

Inherited from: \SugarBean::getFieldDefinition()\Basic::getFieldDefinition()\Person::getFieldDefinition()\User::getFieldDefinition()

The definitions were loaded in the constructor.

Parameters
Name Type Description
$name string

field name,

Returns
Type Description
Array Field properties or boolean false if the field doesn't exist Internal function, do not override.
methodpublicgetFieldDefinitions( ) : Array
inherited

Returns field definitions for the implementing module.

Inherited from: \SugarBean::getFieldDefinitions()\Basic::getFieldDefinitions()\Person::getFieldDefinitions()\User::getFieldDefinitions()

The definitions were loaded in the constructor.

Returns
Type Description
Array Field definitions. Internal function, do not override.
methodpublicgetFieldValue( string $name ) : \varies
inherited

Returns the value for the requested field.

Inherited from: \SugarBean::getFieldValue()\Basic::getFieldValue()\Person::getFieldValue()\User::getFieldValue()

When a row of data is fetched using the bean, all fields are created as variables in the context of the bean and then fetched values are set in these variables.

Parameters
Name Type Description
$name string

field name,

Returns
Type Description
\varies Field value. Internal function, do not override.
methodpublicgetIndices( ) : Array
inherited

Returns index definitions for the implementing module.

Inherited from: \SugarBean::getIndices()\Basic::getIndices()\Person::getIndices()\User::getIndices()

The definitions were loaded in the constructor.

Returns
Type Description
Array Index definitions. Internal function, do not override.
methodpublicgetLicensedUsersWhere( ) : string
staticinherited

Get WHERE clause that fetches all users counted for licensing purposes

Inherited from: \User::getLicensedUsersWhere()
Returns
Type Description
string
methodpublicgetLocaleFormatDesc( ) : string
inherited

gets a human-readable explanation of the format macro

Inherited from: \User::getLocaleFormatDesc()
Returns
Type Description
string Human readable name format
methodpublicgetObjectName( ) : \nothing
inherited

Returns the object name. If object_name is not set, table_name is returned.

Inherited from: \SugarBean::getObjectName()\Basic::getObjectName()\Person::getObjectName()\User::getObjectName()

All implementing classes must set a value for the object_name variable.

Returns
Type Description
\nothing
methodpublicgetOwnerField(  $returnFieldName = false ) : STRING
Parameters
Name Type Description
$returnFieldName
Returns
Type Description
STRING
methodpublicgetOwnerWhere( \GUID $user_id ) : STRING
inherited

Gets there where statement for checking if a user is an owner

Inherited from: \SugarBean::getOwnerWhere()\Basic::getOwnerWhere()\Person::getOwnerWhere()\User::getOwnerWhere()
Parameters
Name Type Description
$user_id \GUID
Returns
Type Description
STRING
methodpublicgetPasswordHash( string $password ) : void
staticinherited

Generate a new hash from plaintext password

Inherited from: \User::getPasswordHash()
Parameters
Name Type Description
$password string
methodpublicgetPreference( string $name, string $category = 'global' ) : mixed
inherited

Interface for the User object to calling the UserPreference::setPreference() method in modules/UserPreferences/UserPreference.php

Inherited from: \User::getPreference()
Parameters
Name Type Description
$name string

name of the preference to retreive

$category string

name of the category to retreive, defaults to global scope

Returns
Type Description
mixed the value of the preference (string, array, int etc)
Details
See
\UserPreference::getPreference()  
methodpublicgetPreferredEmail( ) : void
inherited

Inherited from: \User::getPreferredEmail()
methodpublicgetPrimaryFieldDefinition( ) : Array

The definitions were loaded in the constructor.

Returns
Type Description
Array Field properties. Internal function, do not override.
methodpublicgetRelatedFields(  $module,  $id,  $fields,  $return_array = false ) : void
Parameters
Name Type Description
$module
$id
$fields
$return_array
methodpublicgetSignature( string $id ) : array
inherited

retrieves the signatures for a user

Inherited from: \User::getSignature()
Parameters
Name Type Description
$id string

id ID of user_signature

Returns
Type Description
array ID, signature, and signature_html
methodpublicgetSignatureButtons(  $jscall = '',  $defaultDisplay = false ) : void
inherited

returns buttons and JS for signatures

Inherited from: \User::getSignatureButtons()
Parameters
Name Type Description
$jscall
$defaultDisplay
methodpublicgetSignatures(  $live = false,  $defaultSig = '',  $forSettings = false ) : void
inherited

retrieves any signatures that the User may have created as