@@ -82,7 +82,8 @@ function onShowEnd() {
8282
8383 $ app ->uses ('getconf ' );
8484 $ global_config = $ app ->getconf ->get_global_config ('sites ' );
85- $ ftpuser_prefix = ($ global_config ['ftpuser_prefix ' ] == '' )?'' :str_replace ('[CLIENTNAME] ' , $ this ->getClientName (), $ global_config ['ftpuser_prefix ' ]);
85+ // $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']);
86+ $ ftpuser_prefix = replacePrefix ($ global_config ['ftpuser_prefix ' ], $ this ->dataRecord );
8687
8788 if ($ this ->dataRecord ['username ' ] != "" ){
8889 /* REMOVE the restriction */
@@ -115,7 +116,8 @@ function onBeforeInsert() {
115116
116117 $ app ->uses ('getconf ' );
117118 $ global_config = $ app ->getconf ->get_global_config ('sites ' );
118- $ ftpuser_prefix = ($ global_config ['ftpuser_prefix ' ] == '' )?'' :str_replace ('[CLIENTNAME] ' , $ this ->getClientName (), $ global_config ['ftpuser_prefix ' ]);
119+ //$ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']);
120+ $ ftpuser_prefix = replacePrefix ($ global_config ['ftpuser_prefix ' ], $ this ->dataRecord );
119121
120122 if ($ app ->tform ->errorMessage == '' ) {
121123 $ this ->dataRecord ['username ' ] = $ ftpuser_prefix . $ this ->dataRecord ['username ' ];
@@ -151,7 +153,8 @@ function onBeforeUpdate() {
151153
152154 $ app ->uses ('getconf ' );
153155 $ global_config = $ app ->getconf ->get_global_config ('sites ' );
154- $ ftpuser_prefix = ($ global_config ['ftpuser_prefix ' ] == '' )?'' :str_replace ('[CLIENTNAME] ' , $ this ->getClientName (), $ global_config ['ftpuser_prefix ' ]);
156+ //$ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']);
157+ $ ftpuser_prefix = replacePrefix ($ global_config ['ftpuser_prefix ' ], $ this ->dataRecord );
155158
156159 /* restrict the names */
157160 if ($ app ->tform ->errorMessage == '' ) {
0 commit comments