3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
24 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
25 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
27 # !! DO NOT EDIT THIS FILE !!
51 @ISA= qw( RT::Record );
56 $self->Table('Users');
57 $self->SUPER::_Init(@_);
64 =item Create PARAMHASH
66 Create takes a hash of values and creates a row in the database:
69 varchar(40) 'Password'.
72 varchar(120) 'EmailAddress'.
73 blob 'FreeformContactInfo'.
74 varchar(200) 'Organization'.
75 varchar(120) 'RealName'.
76 varchar(16) 'NickName'.
78 varchar(16) 'EmailEncoding'.
79 varchar(16) 'WebEncoding'.
80 varchar(100) 'ExternalContactInfoId'.
81 varchar(30) 'ContactInfoSystem'.
82 varchar(100) 'ExternalAuthId'.
83 varchar(30) 'AuthSystem'.
85 varchar(30) 'HomePhone'.
86 varchar(30) 'WorkPhone'.
87 varchar(30) 'MobilePhone'.
88 varchar(30) 'PagerPhone'.
89 varchar(200) 'Address1'.
90 varchar(200) 'Address2'.
94 varchar(50) 'Country'.
95 varchar(50) 'Timezone'.
111 FreeformContactInfo => '',
118 ExternalContactInfoId => '',
119 ContactInfoSystem => '',
120 ExternalAuthId => '',
137 $self->SUPER::Create(
138 Name => $args{'Name'},
139 Password => $args{'Password'},
140 Comments => $args{'Comments'},
141 Signature => $args{'Signature'},
142 EmailAddress => $args{'EmailAddress'},
143 FreeformContactInfo => $args{'FreeformContactInfo'},
144 Organization => $args{'Organization'},
145 RealName => $args{'RealName'},
146 NickName => $args{'NickName'},
147 Lang => $args{'Lang'},
148 EmailEncoding => $args{'EmailEncoding'},
149 WebEncoding => $args{'WebEncoding'},
150 ExternalContactInfoId => $args{'ExternalContactInfoId'},
151 ContactInfoSystem => $args{'ContactInfoSystem'},
152 ExternalAuthId => $args{'ExternalAuthId'},
153 AuthSystem => $args{'AuthSystem'},
154 Gecos => $args{'Gecos'},
155 HomePhone => $args{'HomePhone'},
156 WorkPhone => $args{'WorkPhone'},
157 MobilePhone => $args{'MobilePhone'},
158 PagerPhone => $args{'PagerPhone'},
159 Address1 => $args{'Address1'},
160 Address2 => $args{'Address2'},
161 City => $args{'City'},
162 State => $args{'State'},
164 Country => $args{'Country'},
165 Timezone => $args{'Timezone'},
166 PGPKey => $args{'PGPKey'},
175 Returns the current value of id.
176 (In the database, id is stored as int(11).)
184 Returns the current value of Name.
185 (In the database, Name is stored as varchar(200).)
193 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
194 (In the database, Name will be stored as a varchar(200).)
202 Returns the current value of Password.
203 (In the database, Password is stored as varchar(40).)
207 =item SetPassword VALUE
210 Set Password to VALUE.
211 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
212 (In the database, Password will be stored as a varchar(40).)
220 Returns the current value of Comments.
221 (In the database, Comments is stored as blob.)
225 =item SetComments VALUE
228 Set Comments to VALUE.
229 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
230 (In the database, Comments will be stored as a blob.)
238 Returns the current value of Signature.
239 (In the database, Signature is stored as blob.)
243 =item SetSignature VALUE
246 Set Signature to VALUE.
247 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
248 (In the database, Signature will be stored as a blob.)
256 Returns the current value of EmailAddress.
257 (In the database, EmailAddress is stored as varchar(120).)
261 =item SetEmailAddress VALUE
264 Set EmailAddress to VALUE.
265 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
266 (In the database, EmailAddress will be stored as a varchar(120).)
272 =item FreeformContactInfo
274 Returns the current value of FreeformContactInfo.
275 (In the database, FreeformContactInfo is stored as blob.)
279 =item SetFreeformContactInfo VALUE
282 Set FreeformContactInfo to VALUE.
283 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
284 (In the database, FreeformContactInfo will be stored as a blob.)
292 Returns the current value of Organization.
293 (In the database, Organization is stored as varchar(200).)
297 =item SetOrganization VALUE
300 Set Organization to VALUE.
301 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
302 (In the database, Organization will be stored as a varchar(200).)
310 Returns the current value of RealName.
311 (In the database, RealName is stored as varchar(120).)
315 =item SetRealName VALUE
318 Set RealName to VALUE.
319 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
320 (In the database, RealName will be stored as a varchar(120).)
328 Returns the current value of NickName.
329 (In the database, NickName is stored as varchar(16).)
333 =item SetNickName VALUE
336 Set NickName to VALUE.
337 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
338 (In the database, NickName will be stored as a varchar(16).)
346 Returns the current value of Lang.
347 (In the database, Lang is stored as varchar(16).)
355 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
356 (In the database, Lang will be stored as a varchar(16).)
364 Returns the current value of EmailEncoding.
365 (In the database, EmailEncoding is stored as varchar(16).)
369 =item SetEmailEncoding VALUE
372 Set EmailEncoding to VALUE.
373 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
374 (In the database, EmailEncoding will be stored as a varchar(16).)
382 Returns the current value of WebEncoding.
383 (In the database, WebEncoding is stored as varchar(16).)
387 =item SetWebEncoding VALUE
390 Set WebEncoding to VALUE.
391 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
392 (In the database, WebEncoding will be stored as a varchar(16).)
398 =item ExternalContactInfoId
400 Returns the current value of ExternalContactInfoId.
401 (In the database, ExternalContactInfoId is stored as varchar(100).)
405 =item SetExternalContactInfoId VALUE
408 Set ExternalContactInfoId to VALUE.
409 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
410 (In the database, ExternalContactInfoId will be stored as a varchar(100).)
416 =item ContactInfoSystem
418 Returns the current value of ContactInfoSystem.
419 (In the database, ContactInfoSystem is stored as varchar(30).)
423 =item SetContactInfoSystem VALUE
426 Set ContactInfoSystem to VALUE.
427 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
428 (In the database, ContactInfoSystem will be stored as a varchar(30).)
436 Returns the current value of ExternalAuthId.
437 (In the database, ExternalAuthId is stored as varchar(100).)
441 =item SetExternalAuthId VALUE
444 Set ExternalAuthId to VALUE.
445 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
446 (In the database, ExternalAuthId will be stored as a varchar(100).)
454 Returns the current value of AuthSystem.
455 (In the database, AuthSystem is stored as varchar(30).)
459 =item SetAuthSystem VALUE
462 Set AuthSystem to VALUE.
463 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
464 (In the database, AuthSystem will be stored as a varchar(30).)
472 Returns the current value of Gecos.
473 (In the database, Gecos is stored as varchar(16).)
481 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
482 (In the database, Gecos will be stored as a varchar(16).)
490 Returns the current value of HomePhone.
491 (In the database, HomePhone is stored as varchar(30).)
495 =item SetHomePhone VALUE
498 Set HomePhone to VALUE.
499 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
500 (In the database, HomePhone will be stored as a varchar(30).)
508 Returns the current value of WorkPhone.
509 (In the database, WorkPhone is stored as varchar(30).)
513 =item SetWorkPhone VALUE
516 Set WorkPhone to VALUE.
517 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
518 (In the database, WorkPhone will be stored as a varchar(30).)
526 Returns the current value of MobilePhone.
527 (In the database, MobilePhone is stored as varchar(30).)
531 =item SetMobilePhone VALUE
534 Set MobilePhone to VALUE.
535 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
536 (In the database, MobilePhone will be stored as a varchar(30).)
544 Returns the current value of PagerPhone.
545 (In the database, PagerPhone is stored as varchar(30).)
549 =item SetPagerPhone VALUE
552 Set PagerPhone to VALUE.
553 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
554 (In the database, PagerPhone will be stored as a varchar(30).)
562 Returns the current value of Address1.
563 (In the database, Address1 is stored as varchar(200).)
567 =item SetAddress1 VALUE
570 Set Address1 to VALUE.
571 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
572 (In the database, Address1 will be stored as a varchar(200).)
580 Returns the current value of Address2.
581 (In the database, Address2 is stored as varchar(200).)
585 =item SetAddress2 VALUE
588 Set Address2 to VALUE.
589 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
590 (In the database, Address2 will be stored as a varchar(200).)
598 Returns the current value of City.
599 (In the database, City is stored as varchar(100).)
607 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
608 (In the database, City will be stored as a varchar(100).)
616 Returns the current value of State.
617 (In the database, State is stored as varchar(100).)
625 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
626 (In the database, State will be stored as a varchar(100).)
634 Returns the current value of Zip.
635 (In the database, Zip is stored as varchar(16).)
643 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
644 (In the database, Zip will be stored as a varchar(16).)
652 Returns the current value of Country.
653 (In the database, Country is stored as varchar(50).)
657 =item SetCountry VALUE
660 Set Country to VALUE.
661 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
662 (In the database, Country will be stored as a varchar(50).)
670 Returns the current value of Timezone.
671 (In the database, Timezone is stored as varchar(50).)
675 =item SetTimezone VALUE
678 Set Timezone to VALUE.
679 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
680 (In the database, Timezone will be stored as a varchar(50).)
688 Returns the current value of PGPKey.
689 (In the database, PGPKey is stored as text.)
693 =item SetPGPKey VALUE
697 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
698 (In the database, PGPKey will be stored as a text.)
706 Returns the current value of Creator.
707 (In the database, Creator is stored as int(11).)
715 Returns the current value of Created.
716 (In the database, Created is stored as datetime.)
724 Returns the current value of LastUpdatedBy.
725 (In the database, LastUpdatedBy is stored as int(11).)
733 Returns the current value of LastUpdated.
734 (In the database, LastUpdated is stored as datetime.)
741 sub _ClassAccessible {
745 {read => 1, type => 'int(11)', default => ''},
747 {read => 1, write => 1, type => 'varchar(200)', default => ''},
749 {read => 1, write => 1, type => 'varchar(40)', default => ''},
751 {read => 1, write => 1, type => 'blob', default => ''},
753 {read => 1, write => 1, type => 'blob', default => ''},
755 {read => 1, write => 1, type => 'varchar(120)', default => ''},
756 FreeformContactInfo =>
757 {read => 1, write => 1, type => 'blob', default => ''},
759 {read => 1, write => 1, type => 'varchar(200)', default => ''},
761 {read => 1, write => 1, type => 'varchar(120)', default => ''},
763 {read => 1, write => 1, type => 'varchar(16)', default => ''},
765 {read => 1, write => 1, type => 'varchar(16)', default => ''},
767 {read => 1, write => 1, type => 'varchar(16)', default => ''},
769 {read => 1, write => 1, type => 'varchar(16)', default => ''},
770 ExternalContactInfoId =>
771 {read => 1, write => 1, type => 'varchar(100)', default => ''},
773 {read => 1, write => 1, type => 'varchar(30)', default => ''},
775 {read => 1, write => 1, type => 'varchar(100)', default => ''},
777 {read => 1, write => 1, type => 'varchar(30)', default => ''},
779 {read => 1, write => 1, type => 'varchar(16)', default => ''},
781 {read => 1, write => 1, type => 'varchar(30)', default => ''},
783 {read => 1, write => 1, type => 'varchar(30)', default => ''},
785 {read => 1, write => 1, type => 'varchar(30)', default => ''},
787 {read => 1, write => 1, type => 'varchar(30)', default => ''},
789 {read => 1, write => 1, type => 'varchar(200)', default => ''},
791 {read => 1, write => 1, type => 'varchar(200)', default => ''},
793 {read => 1, write => 1, type => 'varchar(100)', default => ''},
795 {read => 1, write => 1, type => 'varchar(100)', default => ''},
797 {read => 1, write => 1, type => 'varchar(16)', default => ''},
799 {read => 1, write => 1, type => 'varchar(50)', default => ''},
801 {read => 1, write => 1, type => 'varchar(50)', default => ''},
803 {read => 1, write => 1, type => 'text', default => ''},
805 {read => 1, auto => 1, type => 'int(11)', default => '0'},
807 {read => 1, auto => 1, type => 'datetime', default => ''},
809 {read => 1, auto => 1, type => 'int(11)', default => '0'},
811 {read => 1, auto => 1, type => 'datetime', default => ''},
817 eval "require RT::User_Overlay";
818 if ($@ && $@ !~ qr{^Can't locate RT/User_Overlay.pm}) {
822 eval "require RT::User_Vendor";
823 if ($@ && $@ !~ qr{^Can't locate RT/User_Vendor.pm}) {
827 eval "require RT::User_Local";
828 if ($@ && $@ !~ qr{^Can't locate RT/User_Local.pm}) {
837 This class allows "overlay" methods to be placed
838 into the following files _Overlay is for a System overlay by the original author,
839 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
841 These overlay files can contain new subs or subs to replace existing subs in this module.
843 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
845 no warnings qw(redefine);
847 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
849 RT::User_Overlay, RT::User_Vendor, RT::User_Local