1 # {{{ BEGIN BPS TAGGED BLOCK
5 # This software is Copyright (c) 1996-2004 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., 675 Mass Ave, Cambridge, MA 02139, USA.
28 # CONTRIBUTION SUBMISSION POLICY:
30 # (The following paragraph is not intended to limit the rights granted
31 # to you to modify and distribute this software under the terms of
32 # the GNU General Public License and is only of importance to you if
33 # you choose to contribute your changes and enhancements to the
34 # community by submitting them to Best Practical Solutions, LLC.)
36 # By intentionally submitting any modifications, corrections or
37 # derivatives to this work, or any other work intended for use with
38 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
39 # you are the copyright holder for those contributions and you grant
40 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
41 # royalty-free, perpetual, license to use, copy, create derivative
42 # works based on those contributions, and sublicense and distribute
43 # those contributions and any derivatives thereof.
45 # }}} END BPS TAGGED BLOCK
46 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
47 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
49 # !! DO NOT EDIT THIS FILE !!
73 @ISA= qw( RT::Record );
78 $self->Table('Users');
79 $self->SUPER::_Init(@_);
86 =head2 Create PARAMHASH
88 Create takes a hash of values and creates a row in the database:
91 varchar(40) 'Password'.
94 varchar(120) 'EmailAddress'.
95 blob 'FreeformContactInfo'.
96 varchar(200) 'Organization'.
97 varchar(120) 'RealName'.
98 varchar(16) 'NickName'.
100 varchar(16) 'EmailEncoding'.
101 varchar(16) 'WebEncoding'.
102 varchar(100) 'ExternalContactInfoId'.
103 varchar(30) 'ContactInfoSystem'.
104 varchar(100) 'ExternalAuthId'.
105 varchar(30) 'AuthSystem'.
107 varchar(30) 'HomePhone'.
108 varchar(30) 'WorkPhone'.
109 varchar(30) 'MobilePhone'.
110 varchar(30) 'PagerPhone'.
111 varchar(200) 'Address1'.
112 varchar(200) 'Address2'.
114 varchar(100) 'State'.
116 varchar(50) 'Country'.
117 varchar(50) 'Timezone'.
133 FreeformContactInfo => '',
140 ExternalContactInfoId => '',
141 ContactInfoSystem => '',
142 ExternalAuthId => '',
159 $self->SUPER::Create(
160 Name => $args{'Name'},
161 Password => $args{'Password'},
162 Comments => $args{'Comments'},
163 Signature => $args{'Signature'},
164 EmailAddress => $args{'EmailAddress'},
165 FreeformContactInfo => $args{'FreeformContactInfo'},
166 Organization => $args{'Organization'},
167 RealName => $args{'RealName'},
168 NickName => $args{'NickName'},
169 Lang => $args{'Lang'},
170 EmailEncoding => $args{'EmailEncoding'},
171 WebEncoding => $args{'WebEncoding'},
172 ExternalContactInfoId => $args{'ExternalContactInfoId'},
173 ContactInfoSystem => $args{'ContactInfoSystem'},
174 ExternalAuthId => $args{'ExternalAuthId'},
175 AuthSystem => $args{'AuthSystem'},
176 Gecos => $args{'Gecos'},
177 HomePhone => $args{'HomePhone'},
178 WorkPhone => $args{'WorkPhone'},
179 MobilePhone => $args{'MobilePhone'},
180 PagerPhone => $args{'PagerPhone'},
181 Address1 => $args{'Address1'},
182 Address2 => $args{'Address2'},
183 City => $args{'City'},
184 State => $args{'State'},
186 Country => $args{'Country'},
187 Timezone => $args{'Timezone'},
188 PGPKey => $args{'PGPKey'},
197 Returns the current value of id.
198 (In the database, id is stored as int(11).)
206 Returns the current value of Name.
207 (In the database, Name is stored as varchar(200).)
215 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
216 (In the database, Name will be stored as a varchar(200).)
224 Returns the current value of Password.
225 (In the database, Password is stored as varchar(40).)
229 =head2 SetPassword VALUE
232 Set Password to VALUE.
233 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
234 (In the database, Password will be stored as a varchar(40).)
242 Returns the current value of Comments.
243 (In the database, Comments is stored as blob.)
247 =head2 SetComments VALUE
250 Set Comments to VALUE.
251 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
252 (In the database, Comments will be stored as a blob.)
260 Returns the current value of Signature.
261 (In the database, Signature is stored as blob.)
265 =head2 SetSignature VALUE
268 Set Signature to VALUE.
269 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
270 (In the database, Signature will be stored as a blob.)
278 Returns the current value of EmailAddress.
279 (In the database, EmailAddress is stored as varchar(120).)
283 =head2 SetEmailAddress VALUE
286 Set EmailAddress to VALUE.
287 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
288 (In the database, EmailAddress will be stored as a varchar(120).)
294 =head2 FreeformContactInfo
296 Returns the current value of FreeformContactInfo.
297 (In the database, FreeformContactInfo is stored as blob.)
301 =head2 SetFreeformContactInfo VALUE
304 Set FreeformContactInfo to VALUE.
305 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
306 (In the database, FreeformContactInfo will be stored as a blob.)
314 Returns the current value of Organization.
315 (In the database, Organization is stored as varchar(200).)
319 =head2 SetOrganization VALUE
322 Set Organization to VALUE.
323 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
324 (In the database, Organization will be stored as a varchar(200).)
332 Returns the current value of RealName.
333 (In the database, RealName is stored as varchar(120).)
337 =head2 SetRealName VALUE
340 Set RealName to VALUE.
341 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
342 (In the database, RealName will be stored as a varchar(120).)
350 Returns the current value of NickName.
351 (In the database, NickName is stored as varchar(16).)
355 =head2 SetNickName VALUE
358 Set NickName to VALUE.
359 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
360 (In the database, NickName will be stored as a varchar(16).)
368 Returns the current value of Lang.
369 (In the database, Lang is stored as varchar(16).)
377 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
378 (In the database, Lang will be stored as a varchar(16).)
386 Returns the current value of EmailEncoding.
387 (In the database, EmailEncoding is stored as varchar(16).)
391 =head2 SetEmailEncoding VALUE
394 Set EmailEncoding to VALUE.
395 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
396 (In the database, EmailEncoding will be stored as a varchar(16).)
404 Returns the current value of WebEncoding.
405 (In the database, WebEncoding is stored as varchar(16).)
409 =head2 SetWebEncoding VALUE
412 Set WebEncoding to VALUE.
413 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
414 (In the database, WebEncoding will be stored as a varchar(16).)
420 =head2 ExternalContactInfoId
422 Returns the current value of ExternalContactInfoId.
423 (In the database, ExternalContactInfoId is stored as varchar(100).)
427 =head2 SetExternalContactInfoId VALUE
430 Set ExternalContactInfoId to VALUE.
431 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
432 (In the database, ExternalContactInfoId will be stored as a varchar(100).)
438 =head2 ContactInfoSystem
440 Returns the current value of ContactInfoSystem.
441 (In the database, ContactInfoSystem is stored as varchar(30).)
445 =head2 SetContactInfoSystem VALUE
448 Set ContactInfoSystem to VALUE.
449 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
450 (In the database, ContactInfoSystem will be stored as a varchar(30).)
456 =head2 ExternalAuthId
458 Returns the current value of ExternalAuthId.
459 (In the database, ExternalAuthId is stored as varchar(100).)
463 =head2 SetExternalAuthId VALUE
466 Set ExternalAuthId to VALUE.
467 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
468 (In the database, ExternalAuthId will be stored as a varchar(100).)
476 Returns the current value of AuthSystem.
477 (In the database, AuthSystem is stored as varchar(30).)
481 =head2 SetAuthSystem VALUE
484 Set AuthSystem to VALUE.
485 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
486 (In the database, AuthSystem will be stored as a varchar(30).)
494 Returns the current value of Gecos.
495 (In the database, Gecos is stored as varchar(16).)
499 =head2 SetGecos VALUE
503 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
504 (In the database, Gecos will be stored as a varchar(16).)
512 Returns the current value of HomePhone.
513 (In the database, HomePhone is stored as varchar(30).)
517 =head2 SetHomePhone VALUE
520 Set HomePhone to VALUE.
521 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
522 (In the database, HomePhone will be stored as a varchar(30).)
530 Returns the current value of WorkPhone.
531 (In the database, WorkPhone is stored as varchar(30).)
535 =head2 SetWorkPhone VALUE
538 Set WorkPhone to VALUE.
539 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
540 (In the database, WorkPhone will be stored as a varchar(30).)
548 Returns the current value of MobilePhone.
549 (In the database, MobilePhone is stored as varchar(30).)
553 =head2 SetMobilePhone VALUE
556 Set MobilePhone to VALUE.
557 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
558 (In the database, MobilePhone will be stored as a varchar(30).)
566 Returns the current value of PagerPhone.
567 (In the database, PagerPhone is stored as varchar(30).)
571 =head2 SetPagerPhone VALUE
574 Set PagerPhone to VALUE.
575 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
576 (In the database, PagerPhone will be stored as a varchar(30).)
584 Returns the current value of Address1.
585 (In the database, Address1 is stored as varchar(200).)
589 =head2 SetAddress1 VALUE
592 Set Address1 to VALUE.
593 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
594 (In the database, Address1 will be stored as a varchar(200).)
602 Returns the current value of Address2.
603 (In the database, Address2 is stored as varchar(200).)
607 =head2 SetAddress2 VALUE
610 Set Address2 to VALUE.
611 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
612 (In the database, Address2 will be stored as a varchar(200).)
620 Returns the current value of City.
621 (In the database, City is stored as varchar(100).)
629 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
630 (In the database, City will be stored as a varchar(100).)
638 Returns the current value of State.
639 (In the database, State is stored as varchar(100).)
643 =head2 SetState VALUE
647 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
648 (In the database, State will be stored as a varchar(100).)
656 Returns the current value of Zip.
657 (In the database, Zip is stored as varchar(16).)
665 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
666 (In the database, Zip will be stored as a varchar(16).)
674 Returns the current value of Country.
675 (In the database, Country is stored as varchar(50).)
679 =head2 SetCountry VALUE
682 Set Country to VALUE.
683 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
684 (In the database, Country will be stored as a varchar(50).)
692 Returns the current value of Timezone.
693 (In the database, Timezone is stored as varchar(50).)
697 =head2 SetTimezone VALUE
700 Set Timezone to VALUE.
701 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
702 (In the database, Timezone will be stored as a varchar(50).)
710 Returns the current value of PGPKey.
711 (In the database, PGPKey is stored as text.)
715 =head2 SetPGPKey VALUE
719 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
720 (In the database, PGPKey will be stored as a text.)
728 Returns the current value of Creator.
729 (In the database, Creator is stored as int(11).)
737 Returns the current value of Created.
738 (In the database, Created is stored as datetime.)
746 Returns the current value of LastUpdatedBy.
747 (In the database, LastUpdatedBy is stored as int(11).)
755 Returns the current value of LastUpdated.
756 (In the database, LastUpdated is stored as datetime.)
763 sub _CoreAccessible {
767 {read => 1, type => 'int(11)', default => ''},
769 {read => 1, write => 1, type => 'varchar(200)', default => ''},
771 {read => 1, write => 1, type => 'varchar(40)', default => ''},
773 {read => 1, write => 1, type => 'blob', default => ''},
775 {read => 1, write => 1, type => 'blob', default => ''},
777 {read => 1, write => 1, type => 'varchar(120)', default => ''},
778 FreeformContactInfo =>
779 {read => 1, write => 1, type => 'blob', default => ''},
781 {read => 1, write => 1, type => 'varchar(200)', default => ''},
783 {read => 1, write => 1, type => 'varchar(120)', default => ''},
785 {read => 1, write => 1, type => 'varchar(16)', default => ''},
787 {read => 1, write => 1, type => 'varchar(16)', default => ''},
789 {read => 1, write => 1, type => 'varchar(16)', default => ''},
791 {read => 1, write => 1, type => 'varchar(16)', default => ''},
792 ExternalContactInfoId =>
793 {read => 1, write => 1, type => 'varchar(100)', default => ''},
795 {read => 1, write => 1, type => 'varchar(30)', default => ''},
797 {read => 1, write => 1, type => 'varchar(100)', default => ''},
799 {read => 1, write => 1, type => 'varchar(30)', default => ''},
801 {read => 1, write => 1, type => 'varchar(16)', default => ''},
803 {read => 1, write => 1, type => 'varchar(30)', default => ''},
805 {read => 1, write => 1, type => 'varchar(30)', default => ''},
807 {read => 1, write => 1, type => 'varchar(30)', default => ''},
809 {read => 1, write => 1, type => 'varchar(30)', default => ''},
811 {read => 1, write => 1, type => 'varchar(200)', default => ''},
813 {read => 1, write => 1, type => 'varchar(200)', default => ''},
815 {read => 1, write => 1, type => 'varchar(100)', default => ''},
817 {read => 1, write => 1, type => 'varchar(100)', default => ''},
819 {read => 1, write => 1, type => 'varchar(16)', default => ''},
821 {read => 1, write => 1, type => 'varchar(50)', default => ''},
823 {read => 1, write => 1, type => 'varchar(50)', default => ''},
825 {read => 1, write => 1, type => 'text', default => ''},
827 {read => 1, auto => 1, type => 'int(11)', default => '0'},
829 {read => 1, auto => 1, type => 'datetime', default => ''},
831 {read => 1, auto => 1, type => 'int(11)', default => '0'},
833 {read => 1, auto => 1, type => 'datetime', default => ''},
839 eval "require RT::User_Overlay";
840 if ($@ && $@ !~ qr{^Can't locate RT/User_Overlay.pm}) {
844 eval "require RT::User_Vendor";
845 if ($@ && $@ !~ qr{^Can't locate RT/User_Vendor.pm}) {
849 eval "require RT::User_Local";
850 if ($@ && $@ !~ qr{^Can't locate RT/User_Local.pm}) {
859 This class allows "overlay" methods to be placed
860 into the following files _Overlay is for a System overlay by the original author,
861 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
863 These overlay files can contain new subs or subs to replace existing subs in this module.
865 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
867 no warnings qw(redefine);
869 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
871 RT::User_Overlay, RT::User_Vendor, RT::User_Local