Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
01d133cd
Commit
01d133cd
authored
Sep 24, 2010
by
tbrehm
Browse files
Fixed: FS#1328 - edit ftp/ssh user: mangled usernames with duplicate prefix
parent
28eadb79
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/ftp_user_edit.php
View file @
01d133cd
...
...
@@ -81,7 +81,7 @@ class page_action extends tform_actions {
if
(
$this
->
dataRecord
[
'username'
]
!=
""
){
/* REMOVE the restriction */
$app
->
tpl
->
setVar
(
"username"
,
str
_replace
(
$ftpuser_prefix
,
''
,
$this
->
dataRecord
[
'username'
]));
$app
->
tpl
->
setVar
(
"username"
,
preg
_replace
(
'/'
.
$ftpuser_prefix
.
'/'
,
''
,
$this
->
dataRecord
[
'username'
]
,
1
));
}
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
||
$app
->
auth
->
has_clients
(
$_SESSION
[
's'
][
'user'
][
'userid'
]))
{
$app
->
tpl
->
setVar
(
"username_prefix"
,
$global_config
[
'ftpuser_prefix'
]);
...
...
interface/web/sites/shell_user_edit.php
View file @
01d133cd
...
...
@@ -81,7 +81,7 @@ class page_action extends tform_actions {
if
(
$this
->
dataRecord
[
'username'
]
!=
""
){
/* REMOVE the restriction */
$app
->
tpl
->
setVar
(
"username"
,
str
_replace
(
$shelluser_prefix
,
''
,
$this
->
dataRecord
[
'username'
]));
$app
->
tpl
->
setVar
(
"username"
,
preg
_replace
(
'/'
.
$shelluser_prefix
.
'/'
,
''
,
$this
->
dataRecord
[
'username'
]
,
1
));
}
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
||
$app
->
auth
->
has_clients
(
$_SESSION
[
's'
][
'user'
][
'userid'
]))
{
$app
->
tpl
->
setVar
(
"username_prefix"
,
$global_config
[
'shelluser_prefix'
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment