Index: branches/5.2.x/core/units/users/users_config.php =================================================================== diff -u -N -r14585 -r14596 --- branches/5.2.x/core/units/users/users_config.php (.../users_config.php) (revision 14585) +++ branches/5.2.x/core/units/users/users_config.php (.../users_config.php) (revision 14596) @@ -1,6 +1,6 @@ hBEFORE, 'Conditional' => false, - 'HookToPrefix' => 'affil', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnCheckAffiliateAgreement'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnSubstituteSubscriber', - ), - - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, 'HookToPrefix' => '', 'HookToSpecial' => '*', 'HookToEvent' => Array('OnAfterConfigRead'), @@ -342,148 +331,227 @@ ), ), - 'Fields' => Array - ( - 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Login' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i', - 'error_msgs' => Array('unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!'), - 'not_null' => 1, 'unique' => Array (), 'default' => '', - ), - 'Password' => Array ('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5('')), - 'FirstName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'LastName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Company' => Array ('type' => 'string','not_null' => 1,'default' => ''), - 'Email' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', - 'sample_value' => 'email@domain.com', - 'error_msgs' => Array ( - 'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!' - ), - 'not_null' => 1, 'unique' => Array (), 'required' => 1, 'default' => '' - ), - 'CreatedOn' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'Phone' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Fax' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Street' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Street2' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'City' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'State' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => Array(), - 'not_null' => 1, - 'default' => '', - ), - 'Zip' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Country' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM ' . TABLE_PREFIX . 'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', - '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' => 1), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'tz' => Array('type' => 'int', 'default' => NULL), - 'ip' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'IsBanned' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'PwResetConfirm' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'PwRequestTime' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'AdminLanguage' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', - 'default' => NULL + 'Forms' => Array ( + 'default' => Array ( + 'Fields' => Array ( + 'PortalUserId' => Array ('default' => 0), + 'Login' => Array ( + 'max_len' => 255, + 'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i', + 'error_msgs' => Array( + 'unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!' ), - 'DisplayToPublic' => Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => Array ( - 'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate', - 'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1', - 'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State', - 'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country', - ), 'use_phrases' => 1, 'multiple' => 1, - 'default' => NULL - ), - 'UserType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - 'PrimaryGroupId' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'PortalGroup WHERE Enabled = 1 AND FrontRegistration = 1', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', - 'default' => NULL - ), - 'OldStyleLogin' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - ), + 'unique' => Array (), 'default' => '', + ), + 'Password' => Array ( + 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', + 'default' => 'd41d8cd98f00b204e9800998ecf8427e' + ), + 'FirstName' => Array ('default' => ''), + 'LastName' => Array ('default' => ''), + 'Company' => Array ('default' => ''), + 'Email' => Array ( + 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'sample_value' => 'email@domain.com', 'error_msgs' => Array ( + 'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!' + ), + 'unique' => Array (), 'required' => 1, 'default' => '' + ), + 'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Phone' => Array ('default' => ''), + 'Fax' => Array ('default' => ''), + 'Street' => Array ('default' => ''), + 'Street2' => Array ('default' => ''), + 'City' => Array ('default' => ''), + 'State' => Array ( + 'formatter' => 'kOptionsFormatter', 'options' => Array (), + 'default' => '', + ), + 'Zip' => Array ('default' => ''), + 'Country' => Array ( + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM ' . TABLE_PREFIX . 'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', + 'default' => '', + ), + 'ResourceId' => Array ('default' => 0), + 'Status' => Array ( + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1, + 'default' => 1 + ), + 'Modified' => Array ('formatter' => 'kDateFormatter', 'default' => NULL), + 'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL), + 'tz' => Array ('default' => NULL), + 'ip' => Array ('default' => ''), + 'IsBanned' => Array ('default' => 0), + 'PwResetConfirm' => Array ('default' => ''), + 'PwRequestTime' => Array ('formatter' => 'kDateFormatter', 'default' => NULL), + 'AdminLanguage' => Array ( + 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', + 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL + ), + 'DisplayToPublic' => Array ( + 'formatter' => 'kOptionsFormatter', 'options' => Array ( + 'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate', + 'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1', + 'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State', + 'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country', + ), 'use_phrases' => 1, 'multiple' => 1, + 'default' => NULL + ), + 'UserType' => Array ( + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1, + 'default' => 0 + ), + 'PrimaryGroupId' => Array ( + 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'PortalGroup WHERE Enabled = 1 AND FrontRegistration = 1', + 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL + ), + 'OldStyleLogin' => Array ( + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'default' => 0 + ), + ), - 'VirtualFields' => Array( - 'ValidateLogin' => Array('type'=>'string','default'=>''), - 'SubscribeEmail' => Array('type'=>'string','default'=>''), - 'PrimaryGroup' => Array('type' => 'string', 'default' => ''), - 'RootPassword' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyRootPassword', 'skip_empty' => 1, 'default' => md5('') ), - 'EmailPassword' => Array ('type' => 'string', 'default' => ''), - 'FullName' => Array ('type' => 'string', 'default' => ''), - 'AltName' => Array ('type' => 'string', 'default' => ''), - 'SameImages' => Array ('type' => 'string', 'default' => ''), - 'LocalThumb' => Array ('type' => 'string', 'default' => ''), - 'ThumbPath' => Array ('type' => 'string', 'default' => ''), - 'ThumbUrl' => Array ('type' => 'string', 'default' => ''), - 'LocalImage' => Array ('type' => 'string', 'default' => ''), - 'LocalPath' => Array ('type' => 'string', 'default' => ''), - 'FullUrl' => Array ('type' => 'string', 'default' => ''), + 'VirtualFields' => Array ( + 'PrimaryGroup' => Array ('default' => ''), + 'RootPassword' => Array ( + 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', + 'verify_field' => 'VerifyRootPassword', 'default' => 'd41d8cd98f00b204e9800998ecf8427e' + ), + 'EmailPassword' => Array ('default' => ''), + 'FullName' => Array ('default' => ''), + 'AltName' => Array ('default' => ''), + 'SameImages' => Array ('default' => ''), + 'LocalThumb' => Array ('default' => ''), + 'ThumbPath' => Array ('default' => ''), + 'ThumbUrl' => Array ('default' => ''), + 'LocalImage' => Array ('default' => ''), + 'LocalPath' => Array ('default' => ''), + 'FullUrl' => Array ('default' => ''), + ), + ), - // for login form - 'UserLogin' => Array ( - 'type' => 'string', - 'error_msgs' => Array ( - 'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!' + 'registration' => Array ( + // Front-End user registration form + /*'Fields' => Array ( + 'FirstName' => Array ('required' => 1), + ),*/ + ), + + 'recommend' => Array ( + 'VirtualFields' => Array ( + 'RecommendEmail' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'), + 'sample_value' => 'email@domain.com', + 'required' => 1, 'default' => '' + ), ), - 'default' => '' ), - 'UserPassword' => Array ('type' => 'string', 'default' => ''), - 'UserRememberLogin' => Array ('type' => 'int', 'default' => 0), - // for recommend form - 'RecommendEmail' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', - 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'), - 'sample_value' => 'email@domain.com', 'default' => '' - ), + 'subscription' => Array ( + 'VirtualFields' => Array ( + 'SubscriberEmail' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!'), + 'sample_value' => 'email@domain.com', + 'required' => 1, 'default' => '' + ), + ), + ), - // for forgot password form - 'ForgotLogin' => Array ( - 'type' => 'string', - 'error_msgs' => Array ( - 'required' => '!lu_ferror_forgotpw_nodata!', - 'unknown_username' => '!lu_ferror_unknown_username!', - 'reset_denied' => '!lu_ferror_reset_denied!', - ), - 'default' => '' - ), - 'ForgotEmail' => Array ( - 'type' => 'string', - 'error_msgs' => Array ( - 'required' => '!lu_ferror_forgotpw_nodata!', - 'unknown_email' => '!lu_ferror_unknown_email!', - 'reset_denied' => '!lu_ferror_reset_denied!', - ), - 'default' => '' - ), + 'forgot_password' => Array ( + 'VirtualFields' => Array ( + 'ForgotLogin' => Array ( + 'type' => 'string', + 'error_msgs' => Array ( + 'required' => '!lu_ferror_forgotpw_nodata!', + 'unknown_username' => '!lu_ferror_unknown_username!', + 'reset_denied' => '!lu_ferror_reset_denied!', + ), + 'default' => '' + ), + 'ForgotEmail' => Array ( + 'type' => 'string', + 'error_msgs' => Array ( + 'required' => '!lu_ferror_forgotpw_nodata!', + 'unknown_email' => '!lu_ferror_unknown_email!', + 'reset_denied' => '!lu_ferror_reset_denied!', + ), + 'default' => '' + ), + ), + ), + + 'login' => Array ( + 'VirtualFields' => Array ( + 'UserLogin' => Array ( + 'type' => 'string', + 'error_msgs' => Array ( + 'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!' + ), + 'default' => '' + ), + 'UserPassword' => Array ('type' => 'string', 'default' => ''), + 'UserRememberLogin' => Array ('type' => 'int', 'default' => 0), + ), + ), ), + 'Fields' => Array ( + 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1), + 'Login' => Array ('type' => 'string', 'not_null' => 1), + 'Password' => Array ('type' => 'string', 'skip_empty' => 1), + 'FirstName' => Array ('type' => 'string', 'not_null' => 1), + 'LastName' => Array ('type' => 'string', 'not_null' => 1), + 'Company' => Array ('type' => 'string','not_null' => 1), + 'Email' => Array ('type' => 'string', 'not_null' => 1), + 'CreatedOn' => Array ('type' => 'int'), + 'Phone' => Array ('type' => 'string', 'not_null' => 1), + 'Fax' => Array ('type' => 'string', 'not_null' => 1), + 'Street' => Array ('type' => 'string', 'not_null' => 1), + 'Street2' => Array ('type' => 'string', 'not_null' => 1), + 'City' => Array ('type' => 'string', 'not_null' => 1), + 'State' => Array ('type' => 'string', 'not_null' => 1), + 'Zip' => Array ('type' => 'string', 'not_null' => 1), + 'Country' => Array ('type' => 'string', 'not_null' => 1), + 'ResourceId' => Array ('type' => 'int', 'not_null' => 1), + 'Status' => Array ('type' => 'int', 'not_null' => 1), + 'Modified' => Array ('type' => 'int'), + 'dob' => Array ('type' => 'int'), + 'tz' => Array ('type' => 'int'), + 'ip' => Array ('type' => 'string', 'not_null' => 1), + 'IsBanned' => Array ('type' => 'int', 'not_null' => 1), + 'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1), + 'PwRequestTime' => Array ('type' => 'int'), + 'AdminLanguage' => Array ('type' => 'int'), + 'DisplayToPublic' => Array ('type' => 'string'), + 'UserType' => Array ('type' => 'int', 'not_null' => 1), + 'PrimaryGroupId' => Array ('type' => 'int'), + 'OldStyleLogin' => Array ('type' => 'int', 'not_null' => 1), + ), + + 'VirtualFields' => Array ( + 'PrimaryGroup' => Array ('type' => 'string'), + 'RootPassword' => Array ('type' => 'string', 'skip_empty' => 1), + 'EmailPassword' => Array ('type' => 'string'), + 'FullName' => Array ('type' => 'string'), + 'AltName' => Array ('type' => 'string'), + 'SameImages' => Array ('type' => 'string'), + 'LocalThumb' => Array ('type' => 'string'), + 'ThumbPath' => Array ('type' => 'string'), + 'ThumbUrl' => Array ('type' => 'string'), + 'LocalImage' => Array ('type' => 'string'), + 'LocalPath' => Array ('type' => 'string'), + 'FullUrl' => Array ('type' => 'string'), + ), + 'Grids' => Array( // not in use 'Default' => Array( @@ -493,15 +561,15 @@ 2 => 'icon16_user_pending.png' ), 'Fields' => Array( - 'Login' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), - 'LastName' => Array ('filter_block' => 'grid_like_filter'), - 'FirstName' => Array ('filter_block' => 'grid_like_filter'), - 'Email' => Array ('filter_block' => 'grid_like_filter'), - 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'), - 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'), - 'Modified' => Array('filter_block' => 'grid_date_range_filter'), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - ), + 'Login' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), + 'LastName' => Array ('filter_block' => 'grid_like_filter'), + 'FirstName' => Array ('filter_block' => 'grid_like_filter'), + 'Email' => Array ('filter_block' => 'grid_like_filter'), + 'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'), + 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'), + 'Modified' => Array('filter_block' => 'grid_date_range_filter'), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + ), ), // used