From 07c297ee6f01eaa810bbfc78f105191033273289 Mon Sep 17 00:00:00 2001 From: Sergio Cambra <sergio@programatica.es> Date: Tue, 29 Jul 2014 07:01:27 -0400 Subject: [PATCH] display prefix when user create new records --- interface/web/sites/shell_user_edit.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index 3c72a5f..5e77fdb 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -82,7 +82,11 @@ $app->tpl->setVar("username", $app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $shelluser_prefix)); } - $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); + if($this->dataRecord['username'] == "" && $_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { + $app->tpl->setVar("username_prefix", $shelluser_prefix); + } else { + $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); + } if($this->id > 0) { //* we are editing a existing record -- Gitblit v1.9.1