tbrehm
2012-11-14 bfcdef6bc91753cb2044e3626f522b5b1aec129f
interface/web/sites/database_edit.php
@@ -166,7 +166,22 @@
            }
         }
      }
      } else {
            // check if client of database parent domain is client of db user!
            $web_group = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = '".$app->functions->intval($this->dataRecord['parent_domain_id'])."'");
            if($this->dataRecord['database_user_id']) {
                $group = $app->db->queryOneRecord("SELECT sys_groupid FROM web_database_user WHERE database_user_id = '".$app->functions->intval($this->dataRecord['database_user_id'])."'");
                if($group['sys_groupid'] != $web_group['sys_groupid']) {
                    $app->error($app->tform->wordbook['database_client_differs_txt']);
                }
            }
            if($this->dataRecord['database_ro_user_id']) {
                $group = $app->db->queryOneRecord("SELECT sys_groupid FROM web_database_user WHERE database_user_id = '".$app->functions->intval($this->dataRecord['database_ro_user_id'])."'");
                if($group['sys_groupid'] != $web_group['sys_groupid']) {
                    $app->error($app->tform->wordbook['database_client_differs_txt']);
                }
            }
        }
      parent::onSubmit();