View Issue Details

IDProjectCategoryView StatusLast Update
0000176Usermanagement[Adventure PHP Framework] Code-Verbesserung // Code improvementpublic2014-03-19 19:36
ReporterdingsdaAssigned To 
PrioritylowSeveritytweakReproducibilityN/A
Status newResolutionopen 
Product Version[Adventure PHP Framework] 2.0 
Target VersionFixed in Version 
Summary0000176: umgtManager hat noch SQL-befehle, bei denen er auch den GORM nutzen könnte
Descriptionso z.b.

   public function loadUserByDisplayName($displayName) {

      $orm = & $this->getORMapper();

      if(UserFieldEncryptionProvider::propertyHasEncryptionEnabled('DisplayName')) {
          $displayName = UserFieldEncryptionProvider::encrypt($displayName);
      }
      
      // escape the input values
      $dbDriver = & $orm->getDbDriver();
      $displayName = $dbDriver->escapeValue($displayName);

      // create the statement and select user
      $select = 'SELECT * FROM `ent_user` WHERE `DisplayName` = \'' . $displayName . '\';';
      return $orm->loadObjectByTextStatement('User', $select);
   }

==>

    public function loadUserByDisplayName($displayName) {

        $orm = & $this->getORMapper();

        if (UserFieldEncryptionProvider::propertyHasEncryptionEnabled('DisplayName')) {
            $displayName = UserFieldEncryptionProvider::encrypt($displayName);
        }

        $crit = new GenericCriterionObject();
        $crit->addPropertyIndicator('DisplayName', $displayName);
        return $orm->loadObjectByCriterion('User', $crit);

    }

ist zwar nur ne kleine unschönheit, aber sollte auch nicht so schwer sein, das zu ändern.
Tagsgorm, umgt
Codereferenz: ([Datei]:[Zeile])

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2014-03-19 19:34 dingsda New Issue
2014-03-19 19:36 dingsda Tag Attached: gorm
2014-03-19 19:36 dingsda Tag Attached: umgt