HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Adding a FTP user (http://www.howtoforge.com/forums/showthread.php?t=52492)

otacon 29th April 2011 01:55

Adding a FTP user
 
I am trying to use the sites_ftp_user_add function but my current results are that all fields are empty except for the domain, which is correct.

PHP Code:

$params = array( 'server_id' => '1',                              
        
'parent_domain_id' => '55',        
                
'username' => 'testing',
        
'password' => 'testing',
        
'quota_size' => '-1',
        
'active' => 'y');

    
$domain_id $client->sites_ftp_user_add($session_id$client_id$domain_id$params); 

I got the arrays from ftp_user.tform.php so I know those should be correct, but the domain_id line I just guessed at because I am not sure where that comes from other than the "sites_ftp_user_add"

So Question 1. Where does "$domain_id = $client->sites_ftp_user_add($session_id, $client_id, $domain_id, $params); " come from?

2. Why would the parent_domain_id, active and the qouta_size be the only fields that are working?

otacon 2nd May 2011 22:02

ok I found out how to do this.

PHP Code:

$params = array( 'server_id'            => '1',
    
'parent_domain_id'    => '55',
    
'username'            => 'test',
    
'password'            => 'password',
    
'quota_size'        => '-1',
    
'active'            => 'y',
    
    
'uid'                => 'web52',
    
'gid'                => 'client0',
    
'dir'                => '/var/www/clients/client0/web52',
    
'quota_files'        => '100',
    
'ul_ratio'            => '-1',
    
'dl_ratio'            => '200',
    
'ul_bandwidth'        => '-1',
    
'dl_bandwidth'        => '100',);

$domain_id $client->sites_ftp_user_add($session_id$client_id$params); 

the above works.

and I found the last line in remoting.inc.php.


All times are GMT +2. The time now is 10:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.