View Issue Details

IDProjectCategoryView StatusLast Update
0000176Usermanagement[Adventure PHP Framework] Code-Verbesserung // Code improvementpublic2019-02-04 19:46
ReporterdingsdaAssigned To 
PrioritylowSeveritytweakReproducibilityN/A
Status closedResolutionopen 
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

ChristianAchatz

2019-02-04 19:46

administrator   ~0000898

Closing old issues that never got voted to be included in one of the next releases. If you are a reporter or are still interested in this topic, feel free to re-open it.

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
2019-02-04 19:46 ChristianAchatz Note Added: 0000898
2019-02-04 19:46 ChristianAchatz Status new => closed