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-2011 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,
62 //BEGIN SUGARCRM flav=pro
63 'wirelesseditview' => false,
64 'wirelessdetailview' => true,
65 'wirelesslistview' => false,
66 'wireless_basic_search' => false,
67 'wireless_advanced_search' => false,
68 //END SUGARCRM flav=pro
72 'name' => 'user_hash',
73 'vname' => 'LBL_USER_HASH',
76 'reportable' => false,
77 'importable' => 'false',
78 'studio' => array('no_duplicate'=>true, 'listview' => false, 'searchview'=>false),
80 'system_generated_password' => array(
81 'name' => 'system_generated_password',
82 'vname' => 'LBL_SYSTEM_GENERATED_PASSWORD',
85 'reportable' => false,
86 'massupdate' => false,
87 'studio' => array('listview' => false, 'searchview'=>false, 'editview'=>false, 'quickcreate'=>false, 'wirelesseditview' => false),
90 'pwd_last_changed' => array(
91 'name' => 'pwd_last_changed',
92 'vname' => 'LBL_PSW_MODIFIED',
95 'massupdate' => false,
98 * 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
100 'authenticate_id' => array(
101 'name' => 'authenticate_id',
102 'vname' => 'LBL_AUTHENTICATE_ID',
105 'reportable' => false,
106 'importable' => 'false',
107 'studio' => array('listview' => false, 'searchview'=>false),
110 * sugar_login will force the user to use sugar authentication
111 * regardless of what authentication the system is configured to use
113 'sugar_login' => array(
114 'name' => 'sugar_login',
115 'vname' => 'LBL_SUGAR_LOGIN',
118 'reportable' => false,
119 'massupdate' => false,
120 'importable' => false,
121 'studio' => array('listview' => false, 'searchview'=>false),
123 'first_name' => array(
124 'name' => 'first_name',
125 'vname' => 'LBL_FIRST_NAME',
126 'dbType' => 'varchar',
130 'last_name' => array(
131 'name' => 'last_name',
132 'vname' => 'LBL_LAST_NAME',
133 'dbType' => 'varchar',
136 'importable' => 'required',
139 'full_name' => array(
140 'name' => 'full_name',
141 'rname' => 'full_name',
142 'vname' => 'LBL_NAME',
148 'source' => 'non-db',
149 'sort_on' => 'last_name',
150 'sort_on2' => 'first_name',
151 'db_concat_fields' => array(
160 'vname' => 'LBL_NAME',
162 'source' => 'non-db',
164 'db_concat_fields' => array(
168 'importable' => 'false',
171 'name' => 'is_admin',
172 'vname' => 'LBL_IS_ADMIN',
175 'studio' => array('listview' => false, 'searchview'=>false),
177 'external_auth_only' => array(
178 'name' => 'external_auth_only',
179 'vname' => 'LBL_EXT_AUTHENTICATE',
181 'reportable' => false,
182 'massupdate' => false,
184 'studio' => array('listview' => false, 'searchview'=>false),
186 'receive_notifications' => array(
187 'name' => 'receive_notifications',
188 'vname' => 'LBL_RECEIVE_NOTIFICATIONS',
191 'massupdate' => false,
194 'description' => array(
195 'name' => 'description',
196 'vname' => 'LBL_DESCRIPTION',
199 'date_entered' => array(
200 'name' => 'date_entered',
201 'vname' => 'LBL_DATE_ENTERED',
202 'type' => 'datetime',
204 'studio' => array('editview' => false, 'quickcreate' => false, 'wirelesseditview' => false),
206 'date_modified' => array(
207 'name' => 'date_modified',
208 'vname' => 'LBL_DATE_MODIFIED',
209 'type' => 'datetime',
211 'studio' => array('editview' => false, 'quickcreate' => false, 'wirelesseditview' => false),
213 'modified_user_id' => array(
214 'name' => 'modified_user_id',
215 'rname' => 'user_name',
216 'id_name' => 'modified_user_id',
217 'vname' => 'LBL_MODIFIED_BY_ID',
218 'type' => 'assigned_user_name',
223 'modified_by_name' => array(
224 'name' => 'modified_by_name',
225 'vname' => 'LBL_MODIFIED_BY',
227 'source' => 'non-db',
229 'created_by' => array(
230 'name' => 'created_by',
231 'rname' => 'user_name',
232 'id_name' => 'modified_user_id',
233 'vname' => 'LBL_ASSIGNED_TO',
234 'type' => 'assigned_user_name',
240 'created_by_name' => array(
241 'name' => 'created_by_name',
242 'vname' => 'LBL_CREATED_BY_NAME', //bug 48978
244 'source' => 'non-db',
245 'importable' => 'false',
249 'vname' => 'LBL_TITLE',
253 'department' => array(
254 'name' => 'department',
255 'vname' => 'LBL_DEPARTMENT',
259 'phone_home' => array(
260 'name' => 'phone_home',
261 'vname' => 'LBL_HOME_PHONE',
263 'dbType' => 'varchar',
266 'phone_mobile' => array(
267 'name' => 'phone_mobile',
268 'vname' => 'LBL_MOBILE_PHONE',
270 'dbType' => 'varchar',
273 'phone_work' => array(
274 'name' => 'phone_work',
275 'vname' => 'LBL_WORK_PHONE',
277 'dbType' => 'varchar',
280 'phone_other' => array(
281 'name' => 'phone_other',
282 'vname' => 'LBL_OTHER_PHONE',
284 'dbType' => 'varchar',
287 'phone_fax' => array(
288 'name' => 'phone_fax',
289 'vname' => 'LBL_FAX_PHONE',
291 'dbType' => 'varchar',
296 'vname' => 'LBL_STATUS',
299 'options' => 'user_status_dom',
300 'importable' => 'required',
303 'address_street' => array(
304 'name' => 'address_street',
305 'vname' => 'LBL_ADDRESS_STREET',
309 'address_city' => array(
310 'name' => 'address_city',
311 'vname' => 'LBL_ADDRESS_CITY',
315 'address_state' => array(
316 'name' => 'address_state',
317 'vname' => 'LBL_ADDRESS_STATE',
321 'address_country' => array(
322 'name' => 'address_country',
323 'vname' => 'LBL_ADDRESS_COUNTRY',
327 'address_postalcode' => array(
328 'name' => 'address_postalcode',
329 'vname' => 'LBL_ADDRESS_POSTALCODE',
333 // This is a fake field for the edit view
335 'name' => 'UserType',
336 'vname' => 'LBL_USER_TYPE',
339 'options' => 'user_type_dom',
340 'source' => 'non-db',
342 'reportable' => false,
346 'vname' => 'LBL_DELETED',
349 'reportable' => false,
351 'portal_only' => array(
352 'name' => 'portal_only',
353 'vname' => 'LBL_PORTAL_ONLY_USER',
355 'massupdate' => false,
357 'studio' => array('listview' => false, 'searchview'=>false),
359 'show_on_employees' => array(
360 'name' => 'show_on_employees',
361 'vname' => 'LBL_SHOW_ON_EMPLOYEES',
363 'massupdate' => true,
364 'importable' => true,
367 'employee_status' => array(
368 'name' => 'employee_status',
369 'vname' => 'LBL_EMPLOYEE_STATUS',
372 'name' => 'getEmployeeStatusOptions',
374 'include' => 'modules/Employees/EmployeeStatus.php'
378 'messenger_id' => array(
379 'name' => 'messenger_id',
380 'vname' => 'LBL_MESSENGER_ID',
384 'messenger_type' => array(
385 'name' => 'messenger_type',
386 'vname' => 'LBL_MESSENGER_TYPE',
388 'options' => 'messenger_type_dom',
394 'relationship' => 'calls_users',
395 'source' => 'non-db',
396 'vname' => 'LBL_CALLS'
399 'name' => 'meetings',
401 'relationship' => 'meetings_users',
402 'source' => 'non-db',
403 'vname' => 'LBL_MEETINGS'
405 'contacts_sync' => array(
406 'name' => 'contacts_sync',
408 'relationship' => 'contacts_users',
409 'source' => 'non-db',
410 'vname' => 'LBL_CONTACTS_SYNC',
411 'reportable' => false,
413 'reports_to_id' => array(
414 'name' => 'reports_to_id',
415 'vname' => 'LBL_REPORTS_TO_ID',
419 'reports_to_name' => array(
420 'name' => 'reports_to_name',
421 'rname' => 'last_name',
422 'id_name' => 'reports_to_id',
423 'vname' => 'LBL_REPORTS_TO_NAME',
428 'link' => 'reports_to_link',
429 'reportable' => false,
430 'source' => 'non-db',
431 'duplicate_merge' => 'disabled',
434 'reports_to_link' => array(
435 'name' => 'reports_to_link',
437 'relationship' => 'user_direct_reports',
438 'link_type' => 'one',
440 'source' => 'non-db',
441 'vname' => 'LBL_REPORTS_TO',
443 'reportees' => array(
444 'name' => 'reportees',
446 'relationship' => 'user_direct_reports',
447 'link_type' => 'many',
449 'source' => 'non-db',
450 'vname' => 'LBL_REPORTS_TO',
451 'reportable' => false,
455 'vname' => 'LBL_EMAIL',
458 'name' => 'getEmailAddressWidget',
461 'source' => 'non-db',
463 'merge_filter' => 'enabled',
466 'email_addresses' => array(
467 'name' => 'email_addresses',
469 'relationship' => 'users_email_addresses',
470 'module' => 'EmailAddress',
471 'bean_name' => 'EmailAddress',
472 'source' => 'non-db',
473 'vname' => 'LBL_EMAIL_ADDRESSES',
474 'reportable' => false,
477 'email_addresses_primary' => array(
478 'name' => 'email_addresses_primary',
480 'relationship' => 'users_email_addresses_primary',
481 'source' => 'non-db',
482 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
483 'duplicate_merge' => 'disabled',
486 /* Virtual email fields so they will display on the main user page */
487 'email_link_type' => array(
488 'name' => 'email_link_type',
489 'vname' => 'LBL_EMAIL_LINK_TYPE',
491 'options' => 'dom_email_link_type',
492 'importable' => false,
493 'reportable' => false,
494 'source' => 'non-db',
499 'name' => 'aclroles',
501 'relationship' => 'acl_roles_users',
502 'source' => 'non-db',
504 'vname' => 'LBL_ROLES',
507 'name' => 'is_group',
508 'vname' => 'LBL_GROUP_USER',
510 'massupdate' => false,
511 'studio' => array('listview' => false, 'searchview'=>false),
513 /* to support Meetings SubPanels */
514 'c_accept_status_fields' => array(
515 'name' => 'c_accept_status_fields',
517 'relationship_fields' => array(
518 'id' => 'accept_status_id',
519 'accept_status' => 'accept_status_name'
521 'vname' => 'LBL_LIST_ACCEPT_STATUS',
524 'link_type' => 'relationship_info',
525 'source' => 'non-db',
526 'importable' => 'false',
527 'studio' => array('listview' => false, 'searchview'=>false),
529 'm_accept_status_fields' => array(
530 'name' => 'm_accept_status_fields',
532 'relationship_fields' => array(
533 'id' => 'accept_status_id',
534 'accept_status' => 'accept_status_name'
536 'vname' => 'LBL_LIST_ACCEPT_STATUS',
538 'link' => 'meetings',
539 'link_type' => 'relationship_info',
540 'source' => 'non-db',
541 'importable' => 'false',
542 'studio' => array('listview' => false, 'searchview'=>false),
544 'accept_status_id' => array(
545 'name' => 'accept_status_id',
547 'source' => 'non-db',
548 'vname' => 'LBL_LIST_ACCEPT_STATUS',
549 'importable' => 'false',
550 'studio' => array('listview' => false, 'searchview'=>false),
552 'accept_status_name' => array(
553 'name' => 'accept_status_name',
555 'source' => 'non-db',
556 'vname' => 'LBL_LIST_ACCEPT_STATUS',
557 'options' => 'dom_meeting_accept_status',
558 'massupdate' => false,
559 'studio' => array('listview' => false, 'searchview'=>false),
561 'prospect_lists' => array(
562 'name' => 'prospect_lists',
564 'relationship' => 'prospect_list_users',
565 'module' => 'ProspectLists',
566 'source' => 'non-db',
567 'vname' => 'LBL_PROSPECT_LIST',
569 'emails_users' => array(
570 'name' => 'emails_users',
572 'relationship' => 'emails_users_rel',
573 'module' => 'Emails',
574 'source' => 'non-db',
575 'vname' => 'LBL_EMAILS'
578 'name' => 'holidays',
580 'relationship' => 'users_holidays',
581 'source' => 'non-db',
583 'vname' => 'LBL_HOLIDAYS',
589 'relationship' => 'eapm_assigned_user',
590 'vname' => 'LBL_ASSIGNED_TO_USER',
595 'name' => 'oauth_tokens',
597 'relationship' => 'oauthtokens_assigned_user',
598 'vname' => 'LBL_OAUTH_TOKENS',
599 'link_type' => 'one',
600 'module'=>'OAuthTokens',
601 'bean_name'=>'OAuthToken',
607 'name' => 'project_resource',
609 'relationship' => 'projects_users_resources',
610 'source' => 'non-db',
611 'vname' => 'LBL_PROJECTS',
623 'name' => 'idx_user_name',
635 'relationships' => array (
636 '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'),
637 'users_users_signatures' =>
639 'lhs_module'=> 'Users',
640 'lhs_table'=> 'users',
642 'rhs_module'=> 'UserSignature',
643 'rhs_table'=> 'users_signatures',
644 'rhs_key' => 'user_id',
645 'relationship_type'=>'one-to-many'
647 'users_email_addresses' =>
649 'lhs_module'=> "Users", 'lhs_table'=> 'users', 'lhs_key' => 'id',
650 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
651 'relationship_type'=>'many-to-many',
652 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
653 'relationship_role_column'=>'bean_module',
654 'relationship_role_column_value'=>"Users"
656 'users_email_addresses_primary' =>
657 array('lhs_module'=> "Users", 'lhs_table'=> 'users', 'lhs_key' => 'id',
658 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
659 'relationship_type'=>'many-to-many',
660 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
661 'relationship_role_column'=>'primary_address',
662 'relationship_role_column_value'=>'1'