Skip to content

Commit a523371

Browse files
author
Marius Cramer
committed
- ported patch
1 parent 86bc655 commit a523371

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

interface/lib/classes/validate_domain.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ function _check_unique($domain_name, $only_domain = false) {
158158
if($domain['ip_address'] == '' || $domain['ipv6_address'] == ''){
159159
if($domain['parent_domain_id'] > 0){
160160
$parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $domain['parent_domain_id']);
161+
if(is_array($parent_domain) && !empty($parent_domain)){
162+
$domain['ip_address'] = $parent_domain['ip_address'];
163+
$domain['ipv6_address'] = $parent_domain['ipv6_address'];
164+
}
161165
}
162166
}
163167

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ function insert($event_name, $data) {
9696
return false;
9797
}
9898

99+
if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false';
100+
99101
if($app->system->is_user($data['new']['puser'])) {
100102

101103
// Get the UID of the parent user
@@ -194,6 +196,8 @@ function update($event_name, $data) {
194196
return false;
195197
}
196198

199+
if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false';
200+
197201
if($app->system->is_user($data['new']['puser'])) {
198202
// Get the UID of the parent user
199203
$uid = intval($app->system->getuid($data['new']['puser']));

0 commit comments

Comments
 (0)