[otrs-cvs] CVS: otrs/Kernel/System/CustomerUser DB.pm,1.43,1.44

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/CustomerUser
In directory lancelot:/tmp/cvs-serv9545/Kernel/System/CustomerUser

Modified Files:
	DB.pm 
Log Message:
fixed case sensitive of customer user login and agent user login if oracle or postgresql is used

Index: DB.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/CustomerUser/DB.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** DB.pm	13 Dec 2006 17:11:49 -0000	1.43
--- DB.pm	8 Jan 2007 21:16:04 -0000	1.44
***************
*** 1,5 ****
  # --
  # Kernel/System/CustomerUser/DB.pm - some customer user functions
! # Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
--- 1,5 ----
  # --
  # Kernel/System/CustomerUser/DB.pm - some customer user functions
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
***************
*** 90,94 ****
      }
      $SQL .= " FROM $Self->{CustomerTable} WHERE ".
!         " $Self->{CustomerKey} = '".$Self->{DBObject}->Quote($Param{UserLogin})."'";
      # get data
      $Self->{DBObject}->Prepare(SQL => $SQL, Limit => 1);
--- 90,94 ----
      }
      $SQL .= " FROM $Self->{CustomerTable} WHERE ".
!         " LOWER($Self->{CustomerKey}) = LOWER('".$Self->{DBObject}->Quote($Param{UserLogin})."')";
      # get data
      $Self->{DBObject}->Prepare(SQL => $SQL, Limit => 1);
***************
*** 264,271 ****
      $SQL .= $Self->{CustomerKey}." FROM $Self->{CustomerTable} WHERE ";
      if ($Param{User}) {
!         $SQL .= $Self->{CustomerKey}." = '".$Self->{DBObject}->Quote($Param{User})."'";
      }
      elsif ($Param{CustomerID}) {
!         $SQL .= $Self->{CustomerID}." = '".$Self->{DBObject}->Quote($Param{CustomerID})."'";
      }
      # get inital data
--- 264,271 ----
      $SQL .= $Self->{CustomerKey}." FROM $Self->{CustomerTable} WHERE ";
      if ($Param{User}) {
!         $SQL .= "LOWER($Self->{CustomerKey}) = LOWER('".$Self->{DBObject}->Quote($Param{User})."')";
      }
      elsif ($Param{CustomerID}) {
!         $SQL .= "LOWER($Self->{CustomerID}) = LOWER('".$Self->{DBObject}->Quote($Param{CustomerID})."')";
      }
      # get inital data
***************
*** 430,434 ****
      $SQL .= " change_time = current_timestamp, ";
      $SQL .= " change_by = $Param{UserID} ";
!     $SQL .= " WHERE ".$Self->{CustomerKey}." = '".$Self->{DBObject}->Quote($Param{ID})."'";
  
      if ($Self->{DBObject}->Do(SQL => $SQL)) {
--- 430,434 ----
      $SQL .= " change_time = current_timestamp, ";
      $SQL .= " change_by = $Param{UserID} ";
!     $SQL .= " WHERE LOWER($Self->{CustomerKey}) = LOWER('".$Self->{DBObject}->Quote($Param{ID})."')";
  
      if ($Self->{DBObject}->Do(SQL => $SQL)) {
***************
*** 512,516 ****
                  " $Param{PasswordCol} = '".$Self->{DBObject}->Quote($CryptedPw)."' ".
                  " WHERE ".
!                 " $Param{LoginCol} = '".$Self->{DBObject}->Quote($Param{UserLogin})."'",
          )) {
              # log notice
--- 512,516 ----
                  " $Param{PasswordCol} = '".$Self->{DBObject}->Quote($CryptedPw)."' ".
                  " WHERE ".
!                 " LOWER($Param{LoginCol}) = LOWER('".$Self->{DBObject}->Quote($Param{UserLogin})."')",
          )) {
              # log notice



More information about the cvs-log mailing list