1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
6 # <jesse@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/copyleft/gpl.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 }}}
48 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
49 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
51 # !! DO NOT EDIT THIS FILE !!
75 @ISA= qw( RT::Record );
80 $self->Table('Users');
81 $self->SUPER::_Init(@_);
88 =head2 Create PARAMHASH
90 Create takes a hash of values and creates a row in the database:
93 varchar(40) 'Password'.
96 varchar(120) 'EmailAddress'.
97 blob 'FreeformContactInfo'.
98 varchar(200) 'Organization'.
99 varchar(120) 'RealName'.
100 varchar(16) 'NickName'.
102 varchar(16) 'EmailEncoding'.
103 varchar(16) 'WebEncoding'.
104 varchar(100) 'ExternalContactInfoId'.
105 varchar(30) 'ContactInfoSystem'.
106 varchar(100) 'ExternalAuthId'.
107 varchar(30) 'AuthSystem'.
109 varchar(30) 'HomePhone'.
110 varchar(30) 'WorkPhone'.
111 varchar(30) 'MobilePhone'.
112 varchar(30) 'PagerPhone'.
113 varchar(200) 'Address1'.
114 varchar(200) 'Address2'.
116 varchar(100) 'State'.
118 varchar(50) 'Country'.
119 varchar(50) 'Timezone'.
135 FreeformContactInfo => '',
142 ExternalContactInfoId => '',
143 ContactInfoSystem => '',
144 ExternalAuthId => '',
161 $self->SUPER::Create(
162 Name => $args{'Name'},
163 Password => $args{'Password'},
164 Comments => $args{'Comments'},
165 Signature => $args{'Signature'},
166 EmailAddress => $args{'EmailAddress'},
167 FreeformContactInfo => $args{'FreeformContactInfo'},
168 Organization => $args{'Organization'},
169 RealName => $args{'RealName'},
170 NickName => $args{'NickName'},
171 Lang => $args{'Lang'},
172 EmailEncoding => $args{'EmailEncoding'},
173 WebEncoding => $args{'WebEncoding'},
174 ExternalContactInfoId => $args{'ExternalContactInfoId'},
175 ContactInfoSystem => $args{'ContactInfoSystem'},
176 ExternalAuthId => $args{'ExternalAuthId'},
177 AuthSystem => $args{'AuthSystem'},
178 Gecos => $args{'Gecos'},
179 HomePhone => $args{'HomePhone'},
180 WorkPhone => $args{'WorkPhone'},
181 MobilePhone => $args{'MobilePhone'},
182 PagerPhone => $args{'PagerPhone'},
183 Address1 => $args{'Address1'},
184 Address2 => $args{'Address2'},
185 City => $args{'City'},
186 State => $args{'State'},
188 Country => $args{'Country'},
189 Timezone => $args{'Timezone'},
190 PGPKey => $args{'PGPKey'},
199 Returns the current value of id.
200 (In the database, id is stored as int(11).)
208 Returns the current value of Name.
209 (In the database, Name is stored as varchar(200).)
217 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
218 (In the database, Name will be stored as a varchar(200).)
226 Returns the current value of Password.
227 (In the database, Password is stored as varchar(40).)
231 =head2 SetPassword VALUE
234 Set Password to VALUE.
235 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
236 (In the database, Password will be stored as a varchar(40).)
244 Returns the current value of Comments.
245 (In the database, Comments is stored as blob.)
249 =head2 SetComments VALUE
252 Set Comments to VALUE.
253 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
254 (In the database, Comments will be stored as a blob.)
262 Returns the current value of Signature.
263 (In the database, Signature is stored as blob.)
267 =head2 SetSignature VALUE
270 Set Signature to VALUE.
271 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
272 (In the database, Signature will be stored as a blob.)
280 Returns the current value of EmailAddress.
281 (In the database, EmailAddress is stored as varchar(120).)
285 =head2 SetEmailAddress VALUE
288 Set EmailAddress to VALUE.
289 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
290 (In the database, EmailAddress will be stored as a varchar(120).)
296 =head2 FreeformContactInfo
298 Returns the current value of FreeformContactInfo.
299 (In the database, FreeformContactInfo is stored as blob.)
303 =head2 SetFreeformContactInfo VALUE
306 Set FreeformContactInfo to VALUE.
307 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
308 (In the database, FreeformContactInfo will be stored as a blob.)
316 Returns the current value of Organization.
317 (In the database, Organization is stored as varchar(200).)
321 =head2 SetOrganization VALUE
324 Set Organization to VALUE.
325 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
326 (In the database, Organization will be stored as a varchar(200).)
334 Returns the current value of RealName.
335 (In the database, RealName is stored as varchar(120).)
339 =head2 SetRealName VALUE
342 Set RealName to VALUE.
343 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
344 (In the database, RealName will be stored as a varchar(120).)
352 Returns the current value of NickName.
353 (In the database, NickName is stored as varchar(16).)
357 =head2 SetNickName VALUE
360 Set NickName to VALUE.
361 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
362 (In the database, NickName will be stored as a varchar(16).)
370 Returns the current value of Lang.
371 (In the database, Lang is stored as varchar(16).)
379 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
380 (In the database, Lang will be stored as a varchar(16).)
388 Returns the current value of EmailEncoding.
389 (In the database, EmailEncoding is stored as varchar(16).)
393 =head2 SetEmailEncoding VALUE
396 Set EmailEncoding to VALUE.
397 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
398 (In the database, EmailEncoding will be stored as a varchar(16).)
406 Returns the current value of WebEncoding.
407 (In the database, WebEncoding is stored as varchar(16).)
411 =head2 SetWebEncoding VALUE
414 Set WebEncoding to VALUE.
415 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
416 (In the database, WebEncoding will be stored as a varchar(16).)
422 =head2 ExternalContactInfoId
424 Returns the current value of ExternalContactInfoId.
425 (In the database, ExternalContactInfoId is stored as varchar(100).)
429 =head2 SetExternalContactInfoId VALUE
432 Set ExternalContactInfoId to VALUE.
433 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
434 (In the database, ExternalContactInfoId will be stored as a varchar(100).)
440 =head2 ContactInfoSystem
442 Returns the current value of ContactInfoSystem.
443 (In the database, ContactInfoSystem is stored as varchar(30).)
447 =head2 SetContactInfoSystem VALUE
450 Set ContactInfoSystem to VALUE.
451 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
452 (In the database, ContactInfoSystem will be stored as a varchar(30).)
458 =head2 ExternalAuthId
460 Returns the current value of ExternalAuthId.
461 (In the database, ExternalAuthId is stored as varchar(100).)
465 =head2 SetExternalAuthId VALUE
468 Set ExternalAuthId to VALUE.
469 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
470 (In the database, ExternalAuthId will be stored as a varchar(100).)
478 Returns the current value of AuthSystem.
479 (In the database, AuthSystem is stored as varchar(30).)
483 =head2 SetAuthSystem VALUE
486 Set AuthSystem to VALUE.
487 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
488 (In the database, AuthSystem will be stored as a varchar(30).)
496 Returns the current value of Gecos.
497 (In the database, Gecos is stored as varchar(16).)
501 =head2 SetGecos VALUE
505 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
506 (In the database, Gecos will be stored as a varchar(16).)
514 Returns the current value of HomePhone.
515 (In the database, HomePhone is stored as varchar(30).)
519 =head2 SetHomePhone VALUE
522 Set HomePhone to VALUE.
523 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
524 (In the database, HomePhone will be stored as a varchar(30).)
532 Returns the current value of WorkPhone.
533 (In the database, WorkPhone is stored as varchar(30).)
537 =head2 SetWorkPhone VALUE
540 Set WorkPhone to VALUE.
541 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
542 (In the database, WorkPhone will be stored as a varchar(30).)
550 Returns the current value of MobilePhone.
551 (In the database, MobilePhone is stored as varchar(30).)
555 =head2 SetMobilePhone VALUE
558 Set MobilePhone to VALUE.
559 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
560 (In the database, MobilePhone will be stored as a varchar(30).)
568 Returns the current value of PagerPhone.
569 (In the database, PagerPhone is stored as varchar(30).)
573 =head2 SetPagerPhone VALUE
576 Set PagerPhone to VALUE.
577 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
578 (In the database, PagerPhone will be stored as a varchar(30).)
586 Returns the current value of Address1.
587 (In the database, Address1 is stored as varchar(200).)
591 =head2 SetAddress1 VALUE
594 Set Address1 to VALUE.
595 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
596 (In the database, Address1 will be stored as a varchar(200).)
604 Returns the current value of Address2.
605 (In the database, Address2 is stored as varchar(200).)
609 =head2 SetAddress2 VALUE
612 Set Address2 to VALUE.
613 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
614 (In the database, Address2 will be stored as a varchar(200).)
622 Returns the current value of City.
623 (In the database, City is stored as varchar(100).)
631 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
632 (In the database, City will be stored as a varchar(100).)
640 Returns the current value of State.
641 (In the database, State is stored as varchar(100).)
645 =head2 SetState VALUE
649 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
650 (In the database, State will be stored as a varchar(100).)
658 Returns the current value of Zip.
659 (In the database, Zip is stored as varchar(16).)
667 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
668 (In the database, Zip will be stored as a varchar(16).)
676 Returns the current value of Country.
677 (In the database, Country is stored as varchar(50).)
681 =head2 SetCountry VALUE
684 Set Country to VALUE.
685 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
686 (In the database, Country will be stored as a varchar(50).)
694 Returns the current value of Timezone.
695 (In the database, Timezone is stored as varchar(50).)
699 =head2 SetTimezone VALUE
702 Set Timezone to VALUE.
703 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
704 (In the database, Timezone will be stored as a varchar(50).)
712 Returns the current value of PGPKey.
713 (In the database, PGPKey is stored as text.)
717 =head2 SetPGPKey VALUE
721 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
722 (In the database, PGPKey will be stored as a text.)
730 Returns the current value of Creator.
731 (In the database, Creator is stored as int(11).)
739 Returns the current value of Created.
740 (In the database, Created is stored as datetime.)
748 Returns the current value of LastUpdatedBy.
749 (In the database, LastUpdatedBy is stored as int(11).)
757 Returns the current value of LastUpdated.
758 (In the database, LastUpdated is stored as datetime.)
765 sub _CoreAccessible {
769 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
771 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
773 {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
775 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
777 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
779 {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
780 FreeformContactInfo =>
781 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
783 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
785 {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
787 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
789 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
791 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
793 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
794 ExternalContactInfoId =>
795 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
797 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
799 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
801 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
803 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
805 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
807 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
809 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
811 {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
813 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
815 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
817 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
819 {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
821 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
823 {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
825 {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
827 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
829 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
831 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
833 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
835 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
841 eval "require RT::User_Overlay";
842 if ($@ && $@ !~ qr{^Can't locate RT/User_Overlay.pm}) {
846 eval "require RT::User_Vendor";
847 if ($@ && $@ !~ qr{^Can't locate RT/User_Vendor.pm}) {
851 eval "require RT::User_Local";
852 if ($@ && $@ !~ qr{^Can't locate RT/User_Local.pm}) {
861 This class allows "overlay" methods to be placed
862 into the following files _Overlay is for a System overlay by the original author,
863 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
865 These overlay files can contain new subs or subs to replace existing subs in this module.
867 Each of these files should begin with the line
869 no warnings qw(redefine);
871 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
873 RT::User_Overlay, RT::User_Vendor, RT::User_Local