remoting add ftp user.

Discussion in 'General' started by otacon, Nov 9, 2010.

  1. otacon

    otacon New Member

    I am trying to add an ftp user through php, but I am confused on how.

    I have deciphered most of the code except.


    $domain_id = $client->mail_user_add($session_id,$client_id, $params);


    I understand that this line defines what section of the database is being edited, but I am not sure how to adjust it to edit the ftp users.

    So what is mail_user_add? I only see mail_user in phpmyadmin.

    I tried to change mail_user_add to ftp_user_add but soap just gave me an error with that line.


    I would appreciate some guidance please.









    $params = array( 'server_id' => 1,
    'email' => '[email protected]',
    'password' => 'testing',
    'quota' => '10',
    'maildir' => '/var/vmail/dsad.dsa/franek',
    'homedir' => '/var/vmail', 'uid' => '5000',
    'gid' => '5000',
    'postfix' => 'y',
    'disableimap' => '0',
    'disablepop3' => '0');


    $client_id = 0;
    $domain_id = $client->mail_user_add($session_id,$client_id, $params);


    I found the list of remote functions in the remote section of myphp, but sites_ftp_user_add didn't work either.

    List of functions:
    mail_domain_get,mail_domain_add,mail_domain_update,mail_domain_delete,mail_domain_set_status,mail_domain_get_by_domain;mail_user_get,mail_user_add,mail_user_update,mail_user_delete;mail_alias_get,mail_alias_add,mail_alias_update,mail_alias_delete;mail_forward_get,mail_forward_add,mail_forward_update,mail_forward_delete;mail_catchall_get,mail_catchall_add,mail_catchall_update,mail_catchall_delete;mail_transport_get,mail_transport_add,mail_transport_update,mail_transport_delete;mail_whitelist_get,mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete;mail_blacklist_get,mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete;mail_spamfilter_user_get,mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete;mail_policy_get,mail_policy_add,mail_policy_update,mail_policy_delete;mail_fetchmail_get,mail_fetchmail_add,mail_fetchmail_update,mail_fetchmail_delete;mail_spamfilter_whitelist_get,mail_spamfilter_whitelist_add,mail_spamfilter_whitelist_update,mail_spamfilter_whitelist_delete;mail_spamfilter_blacklist_get,mail_spamfilter_blacklist_add,mail_spamfilter_blacklist_update,mail_spamfilter_blacklist_delete;mail_user_filter_get,mail_user_filter_add,mail_user_filter_update,mail_user_filter_delete;mail_filter_get,mail_filter_add,mail_filter_update,mail_filter_delete;client_get,client_add,client_update,client_delete,client_get_sites_by_user,client_get_by_username,client_change_password,client_get_id;server_get,get_function_list,client_templates_get_all;sites_cron_get,sites_cron_add,sites_cron_update,sites_cron_delete;sites_database_get,sites_database_add,sites_database_update,sites_database_delete, sites_database_get_all_by_user;sites_ftp_user_get,sites_ftp_user_add,sites_ftp_user_update,sites_ftp_user_delete;sites_shell_user_get,sites_shell_user_add,sites_shell_user_update,sites_shell_user_delete;sites_web_domain_get,sites_web_domain_add,sites_web_domain_update,sites_web_domain_delete,sites_web_domain_set_status;sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete;sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete;dns_zone_get,dns_zone_add,dns_zone_update,dns_zone_delete,dns_zone_set_status;dns_a_get,dns_a_add,dns_a_update,dns_a_delete;dns_aaaa_get,dns_aaaa_add,dns_aaaa_update,dns_aaaa_delete;dns_alias_get,dns_alias_add,dns_alias_update,dns_alias_delete;dns_cname_get,dns_cname_add,dns_cname_update,dns_cname_delete;dns_hinfo_get,dns_hinfo_add,dns_hinfo_update,dns_hinfo_delete;dns_mx_get,dns_mx_add,dns_mx_update,dns_mx_delete;dns_ns_get,dns_ns_add,dns_ns_update,dns_ns_delete;dns_ptr_get,dns_ptr_add,dns_ptr_update,dns_ptr_delete;dns_rp_get,dns_rp_add,dns_rp_update,dns_rp_delete;dns_srv_get,dns_srv_add,dns_srv_update,dns_srv_delete;dns_txt_get,dns_txt_add,dns_txt_update,dns_txt_delete

    And the code I am trying:

    $params = array( 'server_id' => 1,
    'username' => 'testing',
    'password' => 'testing',
    $domain_id = $client->sites_ftp_user_add($session_id,$client_id, $param$
    $params = array( 'server_id' => 1,


    I am still getting an error on the domain_id line.

    Any Suggestions are appreciated.
     
    Last edited: Nov 9, 2010

Share This Page