public static function modifyRealm($Rpath, $customVals)
 {
     global $cfg;
     if (!is_numeric($Rpath)) {
         $Rpath = AuthUtil::getRealmIDFromPath($Rpath);
     }
     foreach ($cfg['Auth']['realmfields'] as $fieldName => $niceName) {
         if (array_key_exists($fieldName, $customVals)) {
             $customValsInsert[$fieldName] = $customVals[$fieldName];
         }
     }
     $db = Database::getInstance($cfg['Auth']['dsn']);
     $returnVal = $db->update('realms', $customValsInsert, "realmid = {$Rpath}");
     return $returnVal;
 }