Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Jun 18, 11:55 PM

in-portal

Index: branches/unlabeled/unlabeled-1.32.2/core/units/users/users_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.32.2/core/units/users/users_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.32.2/core/units/users/users_config.php (revision 6698)
@@ -0,0 +1,205 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'u',
+ 'ItemClass' => Array('class'=>'UsersItem','file'=>'users_item.php','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'UsersEventHandler','file'=>'users_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'UsersTagProcessor','file'=>'users_tag_processor.php','build_event'=>'OnBuild'),
+ 'RegisterClasses' => Array(
+ Array('pseudo' => 'UsersSyncronizeManager', 'class' => 'UsersSyncronizeManager', 'file' => 'users_syncronize.php', 'build_event' => ''),
+ ),
+
+ 'AutoLoad' => true,
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'u',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnPrepareStates',
+ ),
+
+ Array(
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'affil',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnCheckAffiliateAgreement'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnSubstituteSubscriber',
+ ),
+
+ ),
+
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+
+ 'RegularEvents' => Array(
+ 'membership_expiration' => Array('EventName' => 'OnCheckExpiredMembership', 'RunInterval' => 1800, 'Type' => reAFTER),
+ ),
+
+ 'IDField' => 'PortalUserId',
+
+ 'StatusField' => Array('Status'),
+
+ 'TitleField' => 'Login',
+
+ 'ItemType' => 6, // used for custom fields only (on user's case)
+
+ 'StatisticsInfo' => Array(
+ 'pending' => Array(
+ 'icon' => 'icon16_user_pending.gif',
+ 'label' => 'la_Text_Users',
+ 'js_url' => "set_persistant_var('User_View', 4, 'users/users_list', '#url#')",
+ 'url' => Array('t' => 'users/users_list', 'index_file' => 'users/user_list.php', 'pass' => 'm'),
+ 'status' => STATUS_PENDING,
+ ),
+ ),
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('u'=>'!la_title_Adding_User!'),
+ 'edit_status_labels' => Array('u'=>'!la_title_Editing_User!'),
+ 'new_titlefield' => Array('u'=>'!la_title_New_User!'),
+ ),
+
+ 'users_list' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#)"),
+
+ 'users_edit' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_General!"),
+
+ 'users_select' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#) - !la_title_SelectUser!"),
+
+ 'tree_users' => Array('format' => '!la_section_overview!'),
+ ),
+
+
+ 'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'),
+
+ 'TableName' => TABLE_PREFIX.'PortalUser',
+
+ 'ListSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON %1$s.PortalUserId = ug.PortalUserId AND ug.PrimaryGroup = 1
+ LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON ug.GroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId',
+ ),
+
+ 'ItemSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON %1$s.PortalUserId = ug.PortalUserId AND ug.PrimaryGroup = 1
+ LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON ug.GroupId = g.GroupId
+ LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId',
+ ),
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Login' => 'asc'),
+ )
+ ),
+
+ 'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'fav'),
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
+ ),
+
+ 'Filters' => Array(
+ 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 2 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ )
+ ),
+
+ 'CalculatedFields' => Array(
+ '' => Array(
+ 'PrimaryGroup' => 'g.Name',
+ ),
+ ),
+
+ 'Fields' => Array
+ (
+ 'PortalUserId' => Array(),
+ 'Login' => Array('type' => 'string', 'unique'=>Array('Login'), 'default' => '','required'=>1, 'error_msgs' => Array('unique'=>'!lu_user_already_exist!')),
+ 'Password' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5('') ),
+ 'FirstName' => Array('type' => 'string','default' => ''),
+ 'LastName' => Array('type' => 'string','default' => ''),
+ 'Company' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/', 'unique'=>Array('Email'), 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!') ),
+ 'CreatedOn' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#', 'not_null' => '1' ),
+ 'Phone' => Array('type' => 'string','default' => ''),
+ 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Street' => Array('type' => 'string','default' => ''),
+ 'Street2' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'City' => Array('type' => 'string','default' => ''),
+ 'State' => Array('formatter'=>'kOptionsFormatter',
+ 'options' => Array(),
+ 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+ 'not_null' => '1','default' => ''),
+ 'Zip' => Array('type' => 'string','default' => ''),
+ 'Country' => Array('formatter'=>'kOptionsFormatter',
+ 'options_sql'=>'SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase
+ ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE
+ DestType=1
+ AND
+ LanguageId = %2$s
+ ORDER BY Translation',
+ 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+ 'not_null' => '1','default' => ''),
+ 'ResourceId' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Enabled', 0=>'la_Disabled', 2=>'la_Pending'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
+ 'Modified' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1', 'default' => '#NOW#' ),
+ 'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'not_null' => '1', 'default' => '', 'required'=>1),
+ 'tz' => Array('type' => 'int','default' => ''),
+ 'ip' => Array('type' => 'string','default' => ''),
+ 'IsBanned' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'PassResetTime' => Array('type' => 'int','default' => ''),
+ 'PwResetConfirm' => Array('type' => 'string','default' => ''),
+ 'PwRequestTime' => Array('type' => 'int','default' => ''),
+ 'MinPwResetDelay' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array('300' => '5', '600' => '10', '900' => '15', '1800' => '30', '3600' => '60'), 'use_phrases' => 0, 'not_null' => '1', 'default' => 30),
+ ),
+
+ 'VirtualFields' => Array(
+ 'ValidateLogin' => Array('type'=>'string','default'=>''),
+ 'SubscribeEmail' => Array('type'=>'string','default'=>''),
+ 'PrimaryGroup' => Array('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'),
+ 'Fields' => Array(
+ 'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_checkbox_td'),
+ 'LastName' => Array( 'title'=>'la_col_LastName'),
+ 'FirstName' => Array( 'title'=>'la_col_FirstName'),
+ 'Email' => Array( 'title'=>'la_col_Email'),
+ 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
+ 'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'),
+ ),
+ ),
+
+ 'UserSelector' => Array(
+ 'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'),
+ 'Fields' => Array(
+ 'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_radio_td'),
+ 'LastName' => Array( 'title'=>'la_col_LastName'),
+ 'FirstName' => Array( 'title'=>'la_col_FirstName'),
+ 'Email' => Array( 'title'=>'la_col_Email'),
+ 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
+ 'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'),
+ ),
+ ),
+ ),
+
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.32.2/core/units/users/users_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.32
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline