#1  
Old 23rd July 2010, 22:15
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default User creating

Hello,

I just looking at the creating but i have some questions about it..

When i create a user, it insert the user into sys_user and sys_group via my php query..

That is the next step? I want to create a user in "client" also, so i can make the limits and insert the firstname osv.

How do i do that?
Reply With Quote
Sponsored Links
  #2  
Old 23rd July 2010, 22:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Just use the client_add function from the remote API. Do not add anything manually in sys_user or sys_group as this is all handled by the client_add.

function client_add($session_id, $reseller_id, $params);

$params is an array. Like in all functions of the API, the keys of this array are identical to the fields of the corresponding database table. In this case, the client table. The sys_* database fields are for ispconfigs internal use and do not go into $params.

You find all available functions in the remoting.inc.php file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd July 2010, 23:01
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
Just use the client_add function from the remote API. Do not add anything manually in sys_user or sys_group as this is all handled by the client_add.

function client_add($session_id, $reseller_id, $params);

$params is an array. Like in all functions of the API, the keys of this array are identical to the fields of the corresponding database table. In this case, the client table. The sys_* database fields are for ispconfigs internal use and do not go into $params.

You find all available functions in the remoting.inc.php file.
Hmm, I dont think i can do it without help..

Can i setup the whole client with one script? Like, username, firstname, default webserver, limits all things?

-------------------------------------------------------------------

If i have these variables:

$username
$password
$firstname
$contactperson
$street
$streetnumber
$zipcode
$city
$startmodule
$modules
$language
$email
$telephone
$default_mailserver
$default_webserver
$default_dbserver
--- ALLE LIMITS ---
-------------------------------------------
With the information from the top on the line, how do i create a user?

I think there is more than one user in here there want this help too..

I hope you can help me.. thanks.
Reply With Quote
  #4  
Old 23rd July 2010, 23:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Quote:
Can i setup the whole client with one script? Like, username, firstname, default webserver, limits all things?
Sure, why not? Thats the purpose of this function.

First, take a look at the client table in the database to get all available fields:

Code:
`company_name` varchar(64) default NULL,
  `contact_name` varchar(64) default NULL,
  `street` varchar(255) default NULL,
  `zip` varchar(32) default NULL,
  `city` varchar(64) default NULL,
  `state` varchar(32) default NULL,
  `country` char(2) default NULL,
  `telephone` varchar(32) default NULL,
  `mobile` varchar(32) default NULL,
  `fax` varchar(32) default NULL,
  `email` varchar(255) default NULL,
  `internet` varchar(255) NOT NULL,
  `icq` varchar(16) default NULL,
  `notes` text,
  `default_mailserver` int(11) unsigned NOT NULL default '1',
  `limit_maildomain` int(11) NOT NULL default '-1',
  `limit_mailbox` int(11) NOT NULL default '-1',
  `limit_mailalias` int(11) NOT NULL default '-1',
  `limit_mailaliasdomain` int(11) NOT NULL default '-1',
  `limit_mailforward` int(11) NOT NULL default '-1',
  `limit_mailcatchall` int(11) NOT NULL default '-1',
  `limit_mailrouting` int(11) NOT NULL default '0',
  `limit_mailfilter` int(11) NOT NULL default '-1',
  `limit_fetchmail` int(11) NOT NULL default '-1',
  `limit_mailquota` int(11) NOT NULL default '-1',
  `limit_spamfilter_wblist` int(11) NOT NULL default '0',
  `limit_spamfilter_user` int(11) NOT NULL default '0',
  `limit_spamfilter_policy` int(11) NOT NULL default '0',
  `default_webserver` int(11) unsigned NOT NULL default '1',
  `limit_web_ip` text,
  `limit_web_domain` int(11) NOT NULL default '-1',
  `limit_web_quota` int(11) NOT NULL default '-1',
  `web_php_options` varchar(255) NOT NULL default 'no,fast-cgi,cgi,mod,suphp',
  `limit_web_subdomain` int(11) NOT NULL default '-1',
  `limit_web_aliasdomain` int(11) NOT NULL default '-1',
  `limit_ftp_user` int(11) NOT NULL default '-1',
  `limit_shell_user` int(11) NOT NULL default '0',
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot',
  `limit_webdav_user` int(11) NOT NULL default '0',
  `default_dnsserver` int(11) unsigned NOT NULL default '1',
  `limit_dns_zone` int(11) NOT NULL default '-1',
  `limit_dns_slave_zone` int(11) NOT NULL default '-1',
  `limit_dns_record` int(11) NOT NULL default '-1',
  `default_dbserver` int(11) NOT NULL default '1',
  `limit_database` int(11) NOT NULL default '-1',
  `limit_cron` int(11) NOT NULL default '0',
  `limit_cron_type` enum('url','chrooted','full') NOT NULL default 'url',
  `limit_cron_frequency` int(11) NOT NULL default '5',
  `limit_traffic_quota` int(11) NOT NULL default '-1',
  `limit_client` int(11) NOT NULL default '0',
  `parent_client_id` int(11) unsigned NOT NULL default '0',
  `username` varchar(64) default NULL,
  `password` varchar(64) default NULL,
  `language` char(2) NOT NULL default 'en',
  `usertheme` varchar(32) NOT NULL default 'default',
Then create your params array:

Code:
$params = array('contact_name' => $firstname.' '.$lastname, 'username' => $username, 'password' => $password, .................);
and so on.

and then call the remote function:

Code:
$client->client_add($session_id, 0, $params);
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 23rd July 2010, 23:55
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
Sure, why not? Thats the purpose of this function.

First, take a look at the client table in the database to get all available fields:

Code:
`company_name` varchar(64) default NULL,
  `contact_name` varchar(64) default NULL,
  `street` varchar(255) default NULL,
  `zip` varchar(32) default NULL,
  `city` varchar(64) default NULL,
  `state` varchar(32) default NULL,
  `country` char(2) default NULL,
  `telephone` varchar(32) default NULL,
  `mobile` varchar(32) default NULL,
  `fax` varchar(32) default NULL,
  `email` varchar(255) default NULL,
  `internet` varchar(255) NOT NULL,
  `icq` varchar(16) default NULL,
  `notes` text,
  `default_mailserver` int(11) unsigned NOT NULL default '1',
  `limit_maildomain` int(11) NOT NULL default '-1',
  `limit_mailbox` int(11) NOT NULL default '-1',
  `limit_mailalias` int(11) NOT NULL default '-1',
  `limit_mailaliasdomain` int(11) NOT NULL default '-1',
  `limit_mailforward` int(11) NOT NULL default '-1',
  `limit_mailcatchall` int(11) NOT NULL default '-1',
  `limit_mailrouting` int(11) NOT NULL default '0',
  `limit_mailfilter` int(11) NOT NULL default '-1',
  `limit_fetchmail` int(11) NOT NULL default '-1',
  `limit_mailquota` int(11) NOT NULL default '-1',
  `limit_spamfilter_wblist` int(11) NOT NULL default '0',
  `limit_spamfilter_user` int(11) NOT NULL default '0',
  `limit_spamfilter_policy` int(11) NOT NULL default '0',
  `default_webserver` int(11) unsigned NOT NULL default '1',
  `limit_web_ip` text,
  `limit_web_domain` int(11) NOT NULL default '-1',
  `limit_web_quota` int(11) NOT NULL default '-1',
  `web_php_options` varchar(255) NOT NULL default 'no,fast-cgi,cgi,mod,suphp',
  `limit_web_subdomain` int(11) NOT NULL default '-1',
  `limit_web_aliasdomain` int(11) NOT NULL default '-1',
  `limit_ftp_user` int(11) NOT NULL default '-1',
  `limit_shell_user` int(11) NOT NULL default '0',
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot',
  `limit_webdav_user` int(11) NOT NULL default '0',
  `default_dnsserver` int(11) unsigned NOT NULL default '1',
  `limit_dns_zone` int(11) NOT NULL default '-1',
  `limit_dns_slave_zone` int(11) NOT NULL default '-1',
  `limit_dns_record` int(11) NOT NULL default '-1',
  `default_dbserver` int(11) NOT NULL default '1',
  `limit_database` int(11) NOT NULL default '-1',
  `limit_cron` int(11) NOT NULL default '0',
  `limit_cron_type` enum('url','chrooted','full') NOT NULL default 'url',
  `limit_cron_frequency` int(11) NOT NULL default '5',
  `limit_traffic_quota` int(11) NOT NULL default '-1',
  `limit_client` int(11) NOT NULL default '0',
  `parent_client_id` int(11) unsigned NOT NULL default '0',
  `username` varchar(64) default NULL,
  `password` varchar(64) default NULL,
  `language` char(2) NOT NULL default 'en',
  `usertheme` varchar(32) NOT NULL default 'default',
Then create your params array:

Code:
$params = array('contact_name' => $firstname.' '.$lastname, 'username' => $username, 'password' => $password, .................);
and so on.

and then call the remote function:

Code:
$client->client_add($session_id, 0, $params);

So, something like this(How should the default server be in the variable? With the id of the server?):


<?php

[my variables]

include "/usr/local/ispconfig/interface/lib/classes/remoting.inc.php";

$params = array('contact_name' => $firstname.' '.$lastname,'username' => $username,'password' => $password,'street' => $street.' '.$streetnumber,'zip' => $zipcode,'email' => $email,'default_mailserver' => $mailserver,'default_webserver' => $webserver,'default_dbserver' => $dbserver,'limit_maildomain' => $limit_maildomain,'limit_mailbox' => $limit_mailbox,'limit_mailalias' => $limit_mailalias,'limit_mailaliasdomain' => $limit_mailaliasdomain,'limit_mailforward' => $limit_mailforward,'limit_mailcatchall' => $limit_mailcatchall,'limit_mailrouting' => $limit_mailrouting,'limit_mailfilter' => $limit_mailfilter,'limit_fetchmail' => $limit_fetchmail,'limit_mailquota' => $limit_mailquota,'limit_spamfilter_wblist' => $limit_spamfilter_wblist,'limit_spamfilter_user' => $limit_spamfilter_user,'limit_spamfilter_policy' => $limit_spamfilter_policy,'limit_web_domain' => $limit_web_domain,'limit_web_quota' => $limit_web_quota,'limit_web_subdomain' => $limit_web_subdomain,'limit_web_aliasdomain' => $limit_web_aliasdomain,'limit_ftp_user' => $limit_ftp_user,'limit_shell_user' => $limit_shell_user,'limit_webdav_user' => $limit_webdav_user,'limit_database' => $limit_database,'limit_cron' => $limit_cron,'limit_cron_type' => $limit_cron_type,'limit_cron_frequency' => $limit_cron_frequency,'limit_traffic_quota' => $limit_traffic_quota,'language' => $defaultlanguage');


$client->client_add($session_id, 0, $params);

?>

??? is this right?
Reply With Quote
  #6  
Old 24th July 2010, 00:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

You dont ahve to include any files from ispconfig. This is a remote api, it uses the SOAP protocol over httpd. There are dozens of examples in the remote_client directory in the ispconfig that explain how to use it.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 25th July 2010, 01:04
shoevring shoevring is offline
Member
 
Join Date: Feb 2010
Posts: 71
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
You dont ahve to include any files from ispconfig. This is a remote api, it uses the SOAP protocol over httpd. There are dozens of examples in the remote_client directory in the ispconfig that explain how to use it.
Allright, can you link to some of them?
Reply With Quote
  #8  
Old 25th July 2010, 11:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
 
Default

Quote:
Originally Posted by shoevring View Post
Allright, can you link to some of them?
No, as they are inside the ispconfig tar.gz file.

1) Downliad the ispconfig tar.gz file.
2) unpack it waith tar.
3) Look into the unpacked directories, there is just one directory named remoting_client and there rea dozens of examples inside.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 14:29
The system is currently updating the configuration files. warlock General 8 21st February 2009 19:15
ISPConfig 2.2.14 released till General 48 20th July 2007 00:46
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 11:48


All times are GMT +2. The time now is 09:24.


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