ftp, database prefixes in template

Discussion in 'Installation/Configuration' started by gec, Apr 22, 2014.

  1. gec

    gec Member

    i see that this is all ready requested as a feature but it has a low priority so i do not expect to see it implemented any time soon.

    I've seen many clients confused with the server changing their selected username.

    can i, and which template to edit to show the prefix while creating FTP user, Database user and Database it self?

    thx
     
  2. gec

    gec Member

    found some solutions on the bugtracker:

    Modify in ispconfig/interface/web/sites/ :
    shell_user_edit.php :

    PHP:
    if ($this->dataRecord['username'] != ""){
    /* REMOVE the restriction */
    $app->tpl->setVar("username"$app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $shelluser_prefix));
    } else {
    $this->dataRecord['username_prefix'] = '#';
    }
    ftp_user_edit.php :

    PHP:
    if ($this->dataRecord['username'] != ""){
    /* REMOVE the restriction */
    $app->tpl->setVar("username"$app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $ftpuser_prefix));
    } else {
    $this->dataRecord['username_prefix'] = '#';
    }
    database_user_edit.php:

    PHP:
    if ($this->dataRecord['database_user'] != ""){
    /* REMOVE the restriction */
    $app->tpl->setVar("database_user"$app->tools_sites->removePrefix($this->dataRecord['database_user'], $this->dataRecord['database_user_prefix'], $dbuser_prefix));
    } else { 
    $this->dataRecord['database_user_prefix'] = '#';
    }
    and database_edit.php:

    PHP:
    if ($this->dataRecord['database_name'] != ""){
    /* REMOVE the restriction */
    $app->tpl->setVar("database_name"$app->tools_sites->removePrefix($this->dataRecord['database_name'], $this->dataRecord['database_name_prefix'], $dbname_prefix));
    } else { 
    $this->dataRecord['database_name_prefix'] = '#';
    }
    The fix works. But i'm just a beginner in php and would like to hear from Till if this fix is good regarding security or any other reason i could be missing.

    thx
     
    Last edited: Apr 22, 2014

Share This Page