1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
6 # <sales@bestpractical.com>
8 # (Except where explicitly superseded by other copyright notices)
13 # This work is made available to you under the terms of Version 2 of
14 # the GNU General Public License. A copy of that license should have
15 # been provided with this software, but in any event can be snarfed
18 # This work is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
30 # CONTRIBUTION SUBMISSION POLICY:
32 # (The following paragraph is not intended to limit the rights granted
33 # to you to modify and distribute this software under the terms of
34 # the GNU General Public License and is only of importance to you if
35 # you choose to contribute your changes and enhancements to the
36 # community by submitting them to Best Practical Solutions, LLC.)
38 # By intentionally submitting any modifications, corrections or
39 # derivatives to this work, or any other work intended for use with
40 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 # you are the copyright holder for those contributions and you grant
42 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
43 # royalty-free, perpetual, license to use, copy, create derivative
44 # works based on those contributions, and sublicense and distribute
45 # those contributions and any derivatives thereof.
47 # END BPS TAGGED BLOCK }}}
49 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
50 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
52 # !! DO NOT EDIT THIS FILE !!
76 @ISA= qw( RT::Record );
81 $self->Table('Users');
82 $self->SUPER::_Init(@_);
89 =head2 Create PARAMHASH
91 Create takes a hash of values and creates a row in the database:
94 varchar(40) 'Password'.
97 varchar(120) 'EmailAddress'.
98 blob 'FreeformContactInfo'.
99 varchar(200) 'Organization'.
100 varchar(120) 'RealName'.
101 varchar(16) 'NickName'.
103 varchar(16) 'EmailEncoding'.
104 varchar(16) 'WebEncoding'.
105 varchar(100) 'ExternalContactInfoId'.
106 varchar(30) 'ContactInfoSystem'.
107 varchar(100) 'ExternalAuthId'.
108 varchar(30) 'AuthSystem'.
110 varchar(30) 'HomePhone'.
111 varchar(30) 'WorkPhone'.
112 varchar(30) 'MobilePhone'.
113 varchar(30) 'PagerPhone'.
114 varchar(200) 'Address1'.
115 varchar(200) 'Address2'.
117 varchar(100) 'State'.
119 varchar(50) 'Country'.
120 varchar(50) 'Timezone'.
136 FreeformContactInfo => '',
143 ExternalContactInfoId => '',
144 ContactInfoSystem => '',
145 ExternalAuthId => '',
162 $self->SUPER::Create(
163 Name => $args{'Name'},
164 Password => $args{'Password'},
165 Comments => $args{'Comments'},
166 Signature => $args{'Signature'},
167 EmailAddress => $args{'EmailAddress'},
168 FreeformContactInfo => $args{'FreeformContactInfo'},
169 Organization => $args{'Organization'},
170 RealName => $args{'RealName'},
171 NickName => $args{'NickName'},
172 Lang => $args{'Lang'},
173 EmailEncoding => $args{'EmailEncoding'},
174 WebEncoding => $args{'WebEncoding'},
175 ExternalContactInfoId => $args{'ExternalContactInfoId'},
176 ContactInfoSystem => $args{'ContactInfoSystem'},
177 ExternalAuthId => $args{'ExternalAuthId'},
178 AuthSystem => $args{'AuthSystem'},
179 Gecos => $args{'Gecos'},
180 HomePhone => $args{'HomePhone'},
181 WorkPhone => $args{'WorkPhone'},
182 MobilePhone => $args{'MobilePhone'},
183 PagerPhone => $args{'PagerPhone'},
184 Address1 => $args{'Address1'},
185 Address2 => $args{'Address2'},
186 City => $args{'City'},
187 State => $args{'State'},
189 Country => $args{'Country'},
190 Timezone => $args{'Timezone'},
191 PGPKey => $args{'PGPKey'},
200 Returns the current value of id.
201 (In the database, id is stored as int(11).)
209 Returns the current value of Name.
210 (In the database, Name is stored as varchar(200).)
218 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
219 (In the database, Name will be stored as a varchar(200).)
227 Returns the current value of Password.
228 (In the database, Password is stored as varchar(40).)
232 =head2 SetPassword VALUE
235 Set Password to VALUE.
236 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
237 (In the database, Password will be stored as a varchar(40).)
245 Returns the current value of Comments.
246 (In the database, Comments is stored as blob.)
250 =head2 SetComments VALUE
253 Set Comments to VALUE.
254 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
255 (In the database, Comments will be stored as a blob.)
263 Returns the current value of Signature.
264 (In the database, Signature is stored as blob.)
268 =head2 SetSignature VALUE
271 Set Signature to VALUE.
272 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
273 (In the database, Signature will be stored as a blob.)
281 Returns the current value of EmailAddress.
282 (In the database, EmailAddress is stored as varchar(120).)
286 =head2 SetEmailAddress VALUE
289 Set EmailAddress to VALUE.
290 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
291 (In the database, EmailAddress will be stored as a varchar(120).)
297 =head2 FreeformContactInfo
299 Returns the current value of FreeformContactInfo.
300 (In the database, FreeformContactInfo is stored as blob.)
304 =head2 SetFreeformContactInfo VALUE
307 Set FreeformContactInfo to VALUE.
308 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
309 (In the database, FreeformContactInfo will be stored as a blob.)
317 Returns the current value of Organization.
318 (In the database, Organization is stored as varchar(200).)
322 =head2 SetOrganization VALUE
325 Set Organization to VALUE.
326 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
327 (In the database, Organization will be stored as a varchar(200).)
335 Returns the current value of RealName.
336 (In the database, RealName is stored as varchar(120).)
340 =head2 SetRealName VALUE
343 Set RealName to VALUE.
344 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
345 (In the database, RealName will be stored as a varchar(120).)
353 Returns the current value of NickName.
354 (In the database, NickName is stored as varchar(16).)
358 =head2 SetNickName VALUE
361 Set NickName to VALUE.
362 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
363 (In the database, NickName will be stored as a varchar(16).)
371 Returns the current value of Lang.
372 (In the database, Lang is stored as varchar(16).)
380 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
381 (In the database, Lang will be stored as a varchar(16).)
389 Returns the current value of EmailEncoding.
390 (In the database, EmailEncoding is stored as varchar(16).)
394 =head2 SetEmailEncoding VALUE
397 Set EmailEncoding to VALUE.
398 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
399 (In the database, EmailEncoding will be stored as a varchar(16).)
407 Returns the current value of WebEncoding.
408 (In the database, WebEncoding is stored as varchar(16).)
412 =head2 SetWebEncoding VALUE
415 Set WebEncoding to VALUE.
416 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
417 (In the database, WebEncoding will be stored as a varchar(16).)
423 =head2 ExternalContactInfoId
425 Returns the current value of ExternalContactInfoId.
426 (In the database, ExternalContactInfoId is stored as varchar(100).)
430 =head2 SetExternalContactInfoId VALUE
433 Set ExternalContactInfoId to VALUE.
434 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
435 (In the database, ExternalContactInfoId will be stored as a varchar(100).)
441 =head2 ContactInfoSystem
443 Returns the current value of ContactInfoSystem.
444 (In the database, ContactInfoSystem is stored as varchar(30).)
448 =head2 SetContactInfoSystem VALUE
451 Set ContactInfoSystem to VALUE.
452 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
453 (In the database, ContactInfoSystem will be stored as a varchar(30).)
459 =head2 ExternalAuthId
461 Returns the current value of ExternalAuthId.
462 (In the database, ExternalAuthId is stored as varchar(100).)
466 =head2 SetExternalAuthId VALUE
469 Set ExternalAuthId to VALUE.
470 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
471 (In the database, ExternalAuthId will be stored as a varchar(100).)
479 Returns the current value of AuthSystem.
480 (In the database, AuthSystem is stored as varchar(30).)
484 =head2 SetAuthSystem VALUE
487 Set AuthSystem to VALUE.
488 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
489 (In the database, AuthSystem will be stored as a varchar(30).)
497 Returns the current value of Gecos.
498 (In the database, Gecos is stored as varchar(16).)
502 =head2 SetGecos VALUE
506 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
507 (In the database, Gecos will be stored as a varchar(16).)
515 Returns the current value of HomePhone.
516 (In the database, HomePhone is stored as varchar(30).)
520 =head2 SetHomePhone VALUE
523 Set HomePhone to VALUE.
524 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
525 (In the database, HomePhone will be stored as a varchar(30).)
533 Returns the current value of WorkPhone.
534 (In the database, WorkPhone is stored as varchar(30).)
538 =head2 SetWorkPhone VALUE
541 Set WorkPhone to VALUE.
542 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
543 (In the database, WorkPhone will be stored as a varchar(30).)
551 Returns the current value of MobilePhone.
552 (In the database, MobilePhone is stored as varchar(30).)
556 =head2 SetMobilePhone VALUE
559 Set MobilePhone to VALUE.
560 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
561 (In the database, MobilePhone will be stored as a varchar(30).)
569 Returns the current value of PagerPhone.
570 (In the database, PagerPhone is stored as varchar(30).)
574 =head2 SetPagerPhone VALUE
577 Set PagerPhone to VALUE.
578 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
579 (In the database, PagerPhone will be stored as a varchar(30).)
587 Returns the current value of Address1.
588 (In the database, Address1 is stored as varchar(200).)
592 =head2 SetAddress1 VALUE
595 Set Address1 to VALUE.
596 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
597 (In the database, Address1 will be stored as a varchar(200).)
605 Returns the current value of Address2.
606 (In the database, Address2 is stored as varchar(200).)
610 =head2 SetAddress2 VALUE
613 Set Address2 to VALUE.
614 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
615 (In the database, Address2 will be stored as a varchar(200).)
623 Returns the current value of City.
624 (In the database, City is stored as varchar(100).)
632 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
633 (In the database, City will be stored as a varchar(100).)
641 Returns the current value of State.
642 (In the database, State is stored as varchar(100).)
646 =head2 SetState VALUE
650 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
651 (In the database, State will be stored as a varchar(100).)
659 Returns the current value of Zip.
660 (In the database, Zip is stored as varchar(16).)
668 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
669 (In the database, Zip will be stored as a varchar(16).)
677 Returns the current value of Country.
678 (In the database, Country is stored as varchar(50).)
682 =head2 SetCountry VALUE
685 Set Country to VALUE.
686 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
687 (In the database, Country will be stored as a varchar(50).)
695 Returns the current value of Timezone.
696 (In the database, Timezone is stored as varchar(50).)
700 =head2 SetTimezone VALUE
703 Set Timezone to VALUE.
704 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
705 (In the database, Timezone will be stored as a varchar(50).)
713 Returns the current value of PGPKey.
714 (In the database, PGPKey is stored as text.)
718 =head2 SetPGPKey VALUE
722 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
723 (In the database, PGPKey will be stored as a text.)
731 Returns the current value of Creator.
732 (In the database, Creator is stored as int(11).)
740 Returns the current value of Created.
741 (In the database, Created is stored as datetime.)
749 Returns the current value of LastUpdatedBy.
750 (In the database, LastUpdatedBy is stored as int(11).)
758 Returns the current value of LastUpdated.
759 (In the database, LastUpdated is stored as datetime.)
766 sub _CoreAccessible {
770 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
772 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
774 {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
776 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
778 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
780 {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
781 FreeformContactInfo =>
782 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
784 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
786 {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
788 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
790 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
792 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
794 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
795 ExternalContactInfoId =>
796 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
798 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
800 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
802 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
804 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
806 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
808 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
810 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
812 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
814 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
816 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
818 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
820 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
822 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
824 {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
826 {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
828 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
830 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
832 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
834 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
836 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
841 RT::Base->_ImportOverlays();
845 This class allows "overlay" methods to be placed
846 into the following files _Overlay is for a System overlay by the original author,
847 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
849 These overlay files can contain new subs or subs to replace existing subs in this module.
851 Each of these files should begin with the line
853 no warnings qw(redefine);
855 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
857 RT::User_Overlay, RT::User_Vendor, RT::User_Local