projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[freeside.git]
/
rt
/
lib
/
RT
/
CurrentUser.pm
diff --git
a/rt/lib/RT/CurrentUser.pm
b/rt/lib/RT/CurrentUser.pm
index
7fcc65c
..
4ca2f98
100755
(executable)
--- a/
rt/lib/RT/CurrentUser.pm
+++ b/
rt/lib/RT/CurrentUser.pm
@@
-70,7
+70,7
@@
sub _Init {
$self->Load($Name);
}
$self->Load($Name);
}
-
#
$self->CurrentUser($self);
+ $self->CurrentUser($self);
}
# }}}
}
# }}}
@@
-104,13
+104,15
@@
sub Delete {
sub UserObj {
my $self = shift;
sub UserObj {
my $self = shift;
+ unless ($self->{'UserObj'}) {
use RT::User;
use RT::User;
- my $user = RT::User->new($self);
-
- unless ($user->Load($self->Id)) {
+ $self->{'UserObj'} = RT::User->new($self);
+ unless ($self->{'UserObj'}->Load($self->Id)) {
$RT::Logger->err($self->loc("Couldn't load [_1] from the users database.\n", $self->Id));
}
$RT::Logger->err($self->loc("Couldn't load [_1] from the users database.\n", $self->Id));
}
- return ($user);
+
+ }
+ return ($self->{'UserObj'});
}
# }}}
}
# }}}
@@
-158,7
+160,6
@@
sub _Accessible {
Gecos => 'read',
RealName => 'read',
Password => 'neither',
Gecos => 'read',
RealName => 'read',
Password => 'neither',
- Lang => 'read',
EmailAddress => 'read',
Privileged => 'read',
IsAdministrator => 'read'
EmailAddress => 'read',
Privileged => 'read',
IsAdministrator => 'read'
@@
-240,11
+241,6
@@
sub Load {
if ($identifier !~ /\D/) {
$self->SUPER::LoadById($identifier);
}
if ($identifier !~ /\D/) {
$self->SUPER::LoadById($identifier);
}
-
- elsif (UNIVERSAL::isa($identifier,"RT::User")) {
- # DWIM if they pass a user in
- $self->SUPER::LoadById($identifier->Id);
- }
else {
# This is a bit dangerous, we might get false authen if somebody
# uses ambigous userids or real names:
else {
# This is a bit dangerous, we might get false authen if somebody
# uses ambigous userids or real names:
@@
-333,9
+329,6
@@
sub LanguageHandle {
if ((!defined $self->{'LangHandle'}) ||
(!UNIVERSAL::can($self->{'LangHandle'}, 'maketext')) ||
(@_)) {
if ((!defined $self->{'LangHandle'}) ||
(!UNIVERSAL::can($self->{'LangHandle'}, 'maketext')) ||
(@_)) {
- if ( $self->Lang) {
- push @_, $self->Lang;
- }
$self->{'LangHandle'} = RT::I18N->get_handle(@_);
}
# Fall back to english.
$self->{'LangHandle'} = RT::I18N->get_handle(@_);
}
# Fall back to english.
@@
-372,19
+365,6
@@
sub loc_fuzzy {
}
# }}}
}
# }}}
-
-=head2 CurrentUser
-
-Return the current currentuser object
-
-=cut
-
-sub CurrentUser {
- my $self = shift;
- return($self);
-
-}
-
eval "require RT::CurrentUser_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Vendor.pm});
eval "require RT::CurrentUser_Local";
eval "require RT::CurrentUser_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Vendor.pm});
eval "require RT::CurrentUser_Local";