2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
38 $dictionary['User'] = array(
48 'name' => 'user_name',
49 'vname' => 'LBL_USER_NAME',
50 'type' => 'user_name',
51 'dbType' => 'varchar',
53 'importable' => 'required',
56 'no_duplicate' => true,
59 'quickcreate' => false,
60 'basic_search' => false,
61 'advanced_search' => false,
65 'name' => 'user_hash',
66 'vname' => 'LBL_USER_HASH',
69 'reportable' => false,
70 'importable' => 'false',
78 'system_generated_password' => array(
79 'name' => 'system_generated_password',
80 'vname' => 'LBL_SYSTEM_GENERATED_PASSWORD',
83 'reportable' => false,
84 'massupdate' => false,
93 'pwd_last_changed' => array(
94 'name' => 'pwd_last_changed',
95 'vname' => 'LBL_PSW_MODIFIED',
98 'massupdate' => false,
99 'studio' => array('formula' => false),
102 * authenticate_id is used by authentication plugins so they may place a quick lookup key for looking up a given user after authenticating through the plugin
104 'authenticate_id' => array(
105 'name' => 'authenticate_id',
106 'vname' => 'LBL_AUTHENTICATE_ID',
109 'reportable' => false,
110 'importable' => 'false',
111 'studio' => array('listview' => false, 'searchview'=>false, 'related' => false),
114 * sugar_login will force the user to use sugar authentication
115 * regardless of what authentication the system is configured to use
117 'sugar_login' => array(
118 'name' => 'sugar_login',
119 'vname' => 'LBL_SUGAR_LOGIN',
122 'reportable' => false,
123 'massupdate' => false,
124 'importable' => false,
125 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
127 'first_name' => array(
128 'name' => 'first_name',
129 'vname' => 'LBL_FIRST_NAME',
130 'dbType' => 'varchar',
134 'last_name' => array(
135 'name' => 'last_name',
136 'vname' => 'LBL_LAST_NAME',
137 'dbType' => 'varchar',
140 'importable' => 'required',
143 'full_name' => array(
144 'name' => 'full_name',
145 'rname' => 'full_name',
146 'vname' => 'LBL_NAME',
152 'source' => 'non-db',
153 'sort_on' => 'last_name',
154 'sort_on2' => 'first_name',
155 'db_concat_fields' => array(
160 'studio' => array('formula' => false),
165 'vname' => 'LBL_NAME',
167 'source' => 'non-db',
169 'db_concat_fields' => array(
173 'importable' => 'false',
176 'name' => 'is_admin',
177 'vname' => 'LBL_IS_ADMIN',
180 'studio' => array('listview' => false, 'searchview'=>false, 'related' => false),
182 'external_auth_only' => array(
183 'name' => 'external_auth_only',
184 'vname' => 'LBL_EXT_AUTHENTICATE',
186 'reportable' => false,
187 'massupdate' => false,
189 'studio' => array('listview' => false, 'searchview'=>false, 'related' => false),
191 'receive_notifications' => array(
192 'name' => 'receive_notifications',
193 'vname' => 'LBL_RECEIVE_NOTIFICATIONS',
196 'massupdate' => false,
199 'description' => array(
200 'name' => 'description',
201 'vname' => 'LBL_DESCRIPTION',
204 'date_entered' => array(
205 'name' => 'date_entered',
206 'vname' => 'LBL_DATE_ENTERED',
207 'type' => 'datetime',
211 'quickcreate' => false,
214 'date_modified' => array(
215 'name' => 'date_modified',
216 'vname' => 'LBL_DATE_MODIFIED',
217 'type' => 'datetime',
221 'quickcreate' => false,
224 'modified_user_id' => array(
225 'name' => 'modified_user_id',
226 'rname' => 'user_name',
227 'id_name' => 'modified_user_id',
228 'vname' => 'LBL_MODIFIED_BY_ID',
229 'type' => 'assigned_user_name',
234 'modified_by_name' => array(
235 'name' => 'modified_by_name',
236 'vname' => 'LBL_MODIFIED_BY',
238 'source' => 'non-db',
241 'created_by' => array(
242 'name' => 'created_by',
243 'rname' => 'user_name',
244 'id_name' => 'modified_user_id',
245 'vname' => 'LBL_ASSIGNED_TO',
246 'type' => 'assigned_user_name',
252 'created_by_name' => array(
253 'name' => 'created_by_name',
254 'vname' => 'LBL_CREATED_BY_NAME', //bug 48978
256 'source' => 'non-db',
257 'importable' => 'false',
261 'vname' => 'LBL_TITLE',
265 'department' => array(
266 'name' => 'department',
267 'vname' => 'LBL_DEPARTMENT',
271 'phone_home' => array(
272 'name' => 'phone_home',
273 'vname' => 'LBL_HOME_PHONE',
275 'dbType' => 'varchar',
278 'phone_mobile' => array(
279 'name' => 'phone_mobile',
280 'vname' => 'LBL_MOBILE_PHONE',
282 'dbType' => 'varchar',
285 'phone_work' => array(
286 'name' => 'phone_work',
287 'vname' => 'LBL_WORK_PHONE',
289 'dbType' => 'varchar',
292 'phone_other' => array(
293 'name' => 'phone_other',
294 'vname' => 'LBL_OTHER_PHONE',
296 'dbType' => 'varchar',
299 'phone_fax' => array(
300 'name' => 'phone_fax',
301 'vname' => 'LBL_FAX_PHONE',
303 'dbType' => 'varchar',
308 'vname' => 'LBL_STATUS',
311 'options' => 'user_status_dom',
312 'importable' => 'required',
315 'address_street' => array(
316 'name' => 'address_street',
317 'vname' => 'LBL_ADDRESS_STREET',
321 'address_city' => array(
322 'name' => 'address_city',
323 'vname' => 'LBL_ADDRESS_CITY',
327 'address_state' => array(
328 'name' => 'address_state',
329 'vname' => 'LBL_ADDRESS_STATE',
333 'address_country' => array(
334 'name' => 'address_country',
335 'vname' => 'LBL_ADDRESS_COUNTRY',
339 'address_postalcode' => array(
340 'name' => 'address_postalcode',
341 'vname' => 'LBL_ADDRESS_POSTALCODE',
345 // This is a fake field for the edit view
347 'name' => 'UserType',
348 'vname' => 'LBL_USER_TYPE',
351 'options' => 'user_type_dom',
352 'source' => 'non-db',
354 'reportable' => false,
355 'studio' => array('formula' => false),
359 'vname' => 'LBL_DELETED',
362 'reportable' => false,
364 'portal_only' => array(
365 'name' => 'portal_only',
366 'vname' => 'LBL_PORTAL_ONLY_USER',
368 'massupdate' => false,
370 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
372 'show_on_employees' => array(
373 'name' => 'show_on_employees',
374 'vname' => 'LBL_SHOW_ON_EMPLOYEES',
376 'massupdate' => true,
377 'importable' => true,
379 'studio' => array('formula' => false),
381 'employee_status' => array(
382 'name' => 'employee_status',
383 'vname' => 'LBL_EMPLOYEE_STATUS',
386 'name' => 'getEmployeeStatusOptions',
388 'include' => 'modules/Employees/EmployeeStatus.php'
392 'messenger_id' => array(
393 'name' => 'messenger_id',
394 'vname' => 'LBL_MESSENGER_ID',
398 'messenger_type' => array(
399 'name' => 'messenger_type',
400 'vname' => 'LBL_MESSENGER_TYPE',
402 'options' => 'messenger_type_dom',
408 'relationship' => 'calls_users',
409 'source' => 'non-db',
410 'vname' => 'LBL_CALLS'
413 'name' => 'meetings',
415 'relationship' => 'meetings_users',
416 'source' => 'non-db',
417 'vname' => 'LBL_MEETINGS'
419 'contacts_sync' => array(
420 'name' => 'contacts_sync',
422 'relationship' => 'contacts_users',
423 'source' => 'non-db',
424 'vname' => 'LBL_CONTACTS_SYNC',
425 'reportable' => false,
427 'reports_to_id' => array(
428 'name' => 'reports_to_id',
429 'vname' => 'LBL_REPORTS_TO_ID',
433 'reports_to_name' => array(
434 'name' => 'reports_to_name',
435 'rname' => 'last_name',
436 'id_name' => 'reports_to_id',
437 'vname' => 'LBL_REPORTS_TO_NAME',
442 'link' => 'reports_to_link',
443 'reportable' => false,
444 'source' => 'non-db',
445 'duplicate_merge' => 'disabled',
448 'reports_to_link' => array(
449 'name' => 'reports_to_link',
451 'relationship' => 'user_direct_reports',
452 'link_type' => 'one',
454 'source' => 'non-db',
455 'vname' => 'LBL_REPORTS_TO',
457 'reportees' => array(
458 'name' => 'reportees',
460 'relationship' => 'user_direct_reports',
461 'link_type' => 'many',
463 'source' => 'non-db',
464 'vname' => 'LBL_REPORTS_TO',
465 'reportable' => false,
469 'vname' => 'LBL_EMAIL',
472 'name' => 'getEmailAddressWidget',
475 'source' => 'non-db',
477 'merge_filter' => 'enabled',
480 'email_addresses' => array(
481 'name' => 'email_addresses',
483 'relationship' => 'users_email_addresses',
484 'module' => 'EmailAddress',
485 'bean_name' => 'EmailAddress',
486 'source' => 'non-db',
487 'vname' => 'LBL_EMAIL_ADDRESSES',
488 'reportable' => false,
491 'email_addresses_primary' => array(
492 'name' => 'email_addresses_primary',
494 'relationship' => 'users_email_addresses_primary',
495 'source' => 'non-db',
496 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
497 'duplicate_merge' => 'disabled',
500 /* Virtual email fields so they will display on the main user page */
501 'email_link_type' => array(
502 'name' => 'email_link_type',
503 'vname' => 'LBL_EMAIL_LINK_TYPE',
505 'options' => 'dom_email_link_type',
506 'importable' => false,
507 'reportable' => false,
508 'source' => 'non-db',
513 'name' => 'aclroles',
515 'relationship' => 'acl_roles_users',
516 'source' => 'non-db',
518 'vname' => 'LBL_ROLES',
521 'name' => 'is_group',
522 'vname' => 'LBL_GROUP_USER',
524 'massupdate' => false,
525 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
527 /* to support Meetings SubPanels */
528 'c_accept_status_fields' => array(
529 'name' => 'c_accept_status_fields',
531 'relationship_fields' => array(
532 'id' => 'accept_status_id',
533 'accept_status' => 'accept_status_name'
535 'vname' => 'LBL_LIST_ACCEPT_STATUS',
538 'link_type' => 'relationship_info',
539 'source' => 'non-db',
540 'importable' => 'false',
541 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
543 'm_accept_status_fields' => array(
544 'name' => 'm_accept_status_fields',
546 'relationship_fields' => array(
547 'id' => 'accept_status_id',
548 'accept_status' => 'accept_status_name'
550 'vname' => 'LBL_LIST_ACCEPT_STATUS',
552 'link' => 'meetings',
553 'link_type' => 'relationship_info',
554 'source' => 'non-db',
555 'importable' => 'false',
556 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
558 'accept_status_id' => array(
559 'name' => 'accept_status_id',
561 'source' => 'non-db',
562 'vname' => 'LBL_LIST_ACCEPT_STATUS',
563 'importable' => 'false',
564 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
566 'accept_status_name' => array(
567 'name' => 'accept_status_name',
569 'source' => 'non-db',
570 'vname' => 'LBL_LIST_ACCEPT_STATUS',
571 'options' => 'dom_meeting_accept_status',
572 'massupdate' => false,
573 'studio' => array('listview' => false, 'searchview'=>false, 'formula' => false),
575 'prospect_lists' => array(
576 'name' => 'prospect_lists',
578 'relationship' => 'prospect_list_users',
579 'module' => 'ProspectLists',
580 'source' => 'non-db',
581 'vname' => 'LBL_PROSPECT_LIST',
583 'emails_users' => array(
584 'name' => 'emails_users',
586 'relationship' => 'emails_users_rel',
587 'module' => 'Emails',
588 'source' => 'non-db',
589 'vname' => 'LBL_EMAILS'
592 'name' => 'holidays',
594 'relationship' => 'users_holidays',
595 'source' => 'non-db',
597 'vname' => 'LBL_HOLIDAYS',
603 'relationship' => 'eapm_assigned_user',
604 'vname' => 'LBL_ASSIGNED_TO_USER',
609 'name' => 'oauth_tokens',
611 'relationship' => 'oauthtokens_assigned_user',
612 'vname' => 'LBL_OAUTH_TOKENS',
613 'link_type' => 'one',
614 'module'=>'OAuthTokens',
615 'bean_name'=>'OAuthToken',
621 'name' => 'project_resource',
623 'relationship' => 'projects_users_resources',
624 'source' => 'non-db',
625 'vname' => 'LBL_PROJECTS',
637 'name' => 'idx_user_name',
649 'relationships' => array (
650 'user_direct_reports' => array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id', 'rhs_module'=> 'Users', 'rhs_table'=> 'users', 'rhs_key' => 'reports_to_id', 'relationship_type'=>'one-to-many'),
651 'users_users_signatures' =>
653 'lhs_module'=> 'Users',
654 'lhs_table'=> 'users',
656 'rhs_module'=> 'UserSignature',
657 'rhs_table'=> 'users_signatures',
658 'rhs_key' => 'user_id',
659 'relationship_type'=>'one-to-many'
661 'users_email_addresses' =>
663 'lhs_module'=> "Users", 'lhs_table'=> 'users', 'lhs_key' => 'id',
664 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
665 'relationship_type'=>'many-to-many',
666 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
667 'relationship_role_column'=>'bean_module',
668 'relationship_role_column_value'=>"Users"
670 'users_email_addresses_primary' =>
671 array('lhs_module'=> "Users", 'lhs_table'=> 'users', 'lhs_key' => 'id',
672 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
673 'relationship_type'=>'many-to-many',
674 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
675 'relationship_role_column'=>'primary_address',
676 'relationship_role_column_value'=>'1'