[otrs-cvs] CVS: otrs/Kernel/System User.pm,1.56,1.57
cvs-log at otrs.org
cvs-log at otrs.org
Mon Jan 8 22:16:06 CET 2007
Update of /home/cvs/otrs/Kernel/System
In directory lancelot:/tmp/cvs-serv9545/Kernel/System
Modified Files:
User.pm
Log Message:
fixed case sensitive of customer user login and agent user login if oracle or postgresql is used
Index: User.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/User.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** User.pm 13 Dec 2006 17:11:14 -0000 1.56
--- User.pm 8 Jan 2007 21:16:04 -0000 1.57
***************
*** 1,5 ****
# --
# Kernel/System/User.pm - some user functions
! # Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/User.pm - some user functions
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
***************
*** 41,44 ****
--- 41,46 ----
use Kernel::Config;
use Kernel::System::Log;
+ use Kernel::System::Main;
+ use Kernel::System::Time;
use Kernel::System::DB;
use Kernel::System::User;
***************
*** 48,52 ****
--- 50,63 ----
ConfigObject => $ConfigObject,
);
+ my $MainObject = Kernel::System::Main->new(
+ ConfigObject => $ConfigObject,
+ );
+ my $TimeObject = Kernel::System::Time->new(
+ MainObject => $MainObject,
+ ConfigObject => $ConfigObject,
+ LogObject => $LogObject,
+ );
my $DBObject = Kernel::System::DB->new(
+ MainObject => $MainObject,
ConfigObject => $ConfigObject,
LogObject => $LogObject,
***************
*** 55,58 ****
--- 66,71 ----
ConfigObject => $ConfigObject,
LogObject => $LogObject,
+ MainObject => $MainObject,
+ TimeObject => $TimeObject,
DBObject => $DBObject,
);
***************
*** 68,72 ****
bless ($Self, $Type);
# check needed objects
! foreach (qw(DBObject ConfigObject LogObject)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
--- 81,85 ----
bless ($Self, $Type);
# check needed objects
! foreach (qw(DBObject ConfigObject LogObject TimeObject MainObject)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
***************
*** 83,87 ****
my $GeneratorModule = $Self->{ConfigObject}->Get('User::PreferencesModule')
|| 'Kernel::System::User::Preferences::DB';
! eval "require $GeneratorModule";
$Self->{PreferencesObject} = $GeneratorModule->new(%Param);
--- 96,100 ----
my $GeneratorModule = $Self->{ConfigObject}->Get('User::PreferencesModule')
|| 'Kernel::System::User::Preferences::DB';
! $Self->{MainObject}->Require($GeneratorModule);
$Self->{PreferencesObject} = $GeneratorModule->new(%Param);
***************
*** 134,138 ****
" WHERE ";
if ($Param{User}) {
! $SQL .= " $Self->{UserTableUser} = '".$Self->{DBObject}->Quote($Param{User})."'";
}
else {
--- 147,151 ----
" WHERE ";
if ($Param{User}) {
! $SQL .= " LOWER($Self->{UserTableUser}) = LOWER('".$Self->{DBObject}->Quote($Param{User})."')";
}
else {
***************
*** 264,268 ****
" $Self->{UserTable} " .
" WHERE " .
! " $Self->{UserTableUser} = '$Param{Login}'";
my $UserID = '';
$Self->{DBObject}->Prepare(SQL => $SQL);
--- 277,281 ----
" $Self->{UserTable} " .
" WHERE " .
! " LOWER($Self->{UserTableUser}) = LOWER('$Param{Login}')";
my $UserID = '';
$Self->{DBObject}->Prepare(SQL => $SQL);
***************
*** 545,549 ****
" $Self->{UserTableUserPW} = '$NewPw' ".
" WHERE ".
! " $Self->{UserTableUser} = '$Param{UserLogin}'",
)) {
# log notice
--- 558,562 ----
" $Self->{UserTableUserPW} = '$NewPw' ".
" WHERE ".
! " LOWER($Self->{UserTableUser}) = LOWER('$Param{UserLogin}')",
)) {
# log notice
***************
*** 593,597 ****
# build sql query
my $SQL = "SELECT $Self->{UserTableUserID} FROM $Self->{UserTable} ".
! " WHERE $Self->{UserTableUser} = '$Param{UserLogin}'";
$Self->{DBObject}->Prepare(SQL => $SQL);
while (my @Row = $Self->{DBObject}->FetchrowArray()) {
--- 606,610 ----
# build sql query
my $SQL = "SELECT $Self->{UserTableUserID} FROM $Self->{UserTable} ".
! " WHERE LOWER($Self->{UserTableUser}) = LOWER('$Param{UserLogin}')";
$Self->{DBObject}->Prepare(SQL => $SQL);
while (my @Row = $Self->{DBObject}->FetchrowArray()) {
More information about the cvs-log
mailing list