SHOW:
|
|
- or go back to the newest paste.
| 1 | $Self->{CustomerUser} = {
| |
| 2 | Name => 'Database Backend', | |
| 3 | Module => 'Kernel::System::CustomerUser::DB', | |
| 4 | Params => {
| |
| 5 | # if you want to use an external database, add the | |
| 6 | # required settings | |
| 7 | # DSN => 'DBI:odbc:yourdsn', | |
| 8 | # Type => 'mssql', # only for ODBC connections | |
| 9 | # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost', | |
| 10 | # User => '', | |
| 11 | # Password => '', | |
| 12 | Table => 'customer_user', | |
| 13 | # if your frontend is unicode and the charset of your | |
| 14 | # customer database server is iso-8859-1, use these options. | |
| 15 | # SourceCharset => 'iso-8859-1', | |
| 16 | # DestCharset => 'utf-8', | |
| 17 | ||
| 18 | # CaseSensitive will control if the SQL statements need LOWER() | |
| 19 | # function calls to work case insensitively. Setting this to | |
| 20 | # 1 will improve performance dramatically on large databases. | |
| 21 | CaseSensitive => 0, | |
| 22 | }, | |
| 23 | ||
| 24 | # customer unique id | |
| 25 | CustomerKey => 'login', | |
| 26 | ||
| 27 | # customer # | |
| 28 | CustomerID => 'customer_id', | |
| 29 | CustomerValid => 'valid_id', | |
| 30 | CustomerUserListFields => [ 'first_name', 'last_name', 'email' ], | |
| 31 | ||
| 32 | # CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'], | |
| 33 | CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ], | |
| 34 | CustomerUserSearchPrefix => '*', | |
| 35 | CustomerUserSearchSuffix => '*', | |
| 36 | CustomerUserSearchListLimit => 250, | |
| 37 | CustomerUserPostMasterSearchFields => ['email'], | |
| 38 | CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ], | |
| 39 | CustomerUserEmailUniqCheck => 1, | |
| 40 | ||
| 41 | # # show now own tickets in customer panel, CompanyTickets | |
| 42 | # CustomerUserExcludePrimaryCustomerID => 0, | |
| 43 | # # generate auto logins | |
| 44 | # AutoLoginCreation => 0, | |
| 45 | # # generate auto login prefix | |
| 46 | # AutoLoginCreationPrefix => 'auto', | |
| 47 | # # admin can change customer preferences | |
| 48 | # AdminSetPreferences => 1, | |
| 49 | # # use customer company support (reference to company, See CustomerCompany settings) | |
| 50 | CustomerCompanySupport => 1, | |
| 51 | # cache time to live in sec. - cache any database queries | |
| 52 | CacheTTL => 60 * 60 * 24, | |
| 53 | # # just a read only source | |
| 54 | # ReadOnly => 1, | |
| 55 | Map => [ | |
| 56 | ||
| 57 | # note: Login, Email and CustomerID needed! | |
| 58 | # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es) | |
| 59 | [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ], | |
| 60 | [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ], | |
| 61 | [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ], | |
| 62 | [ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ], | |
| 63 | [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ], | |
| 64 | [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ], | |
| 65 | # [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
| |
| 66 | [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ], | |
| 67 | # [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ], | |
| 68 | [ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ], | |
| 69 | [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ], | |
| 70 | [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ], | |
| 71 | [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ], | |
| 72 | [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ], | |
| 73 | [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ], | |
| 74 | [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ], | |
| 75 | [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ], | |
| 76 | [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ], | |
| 77 | ], | |
| 78 | ||
| 79 | # default selections | |
| 80 | Selections => {
| |
| 81 | ||
| 82 | # UserTitle => {
| |
| 83 | # 'Mr.' => 'Mr.', | |
| 84 | # 'Mrs.' => 'Mrs.', | |
| 85 | # }, | |
| 86 | }, | |
| 87 | }; |