Skip to content

Commit c476308

Browse files
committed
Use instead of
1 parent 1ac5be9 commit c476308

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ function insert($event_name, $data) {
181181
$app->system->chmod($homedir.'/.profile', 0644);
182182
$app->system->chown($homedir.'/.profile', $data['new']['username']);
183183
$app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']);
184-
$profile_content = "
185-
if [ -d ~/.bashrc ]
184+
$profile_content = "if [ -d ~/.bashrc ]
186185
then
187186
. ~/.bashrc
188187
fi
188+
189189
";
190190
$app->system->file_put_contents($homedir.'/.profile', $profile_content);
191191

@@ -333,13 +333,13 @@ function update($event_name, $data) {
333333
$app->system->chmod($homedir.'/.profile', 0644);
334334
$app->system->chown($homedir.'/.profile', $data['new']['puser']);
335335
$app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']);
336-
$profile_content = "
337-
if [ -d ~/.bashrc ]
338-
then
339-
. ~/.bashrc
340-
fi
336+
$profile_content = "if [ -d ~/.bashrc ]
337+
then
338+
. ~/.bashrc
339+
fi
340+
341341
";
342-
$app->system->file_put_contents(($data['new']['dir']).'/.profile', $profile_content);
342+
$app->system->file_put_contents($homedir.'/.profile', $profile_content);
343343
}
344344

345345
//* Create .bashrc.d directory

0 commit comments

Comments
 (0)