HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Developers' Forum (
-   -   Website: Get All FTP acc by domain ID (

branov 6th December 2011 11:50

Website: Get All FTP acc by domain ID
Hi all,

yesterday I programming the new system based on ISPConfig API and I had need to get all FTP accounts by domain ID from ISPConfig. I cant find this funtion in the API functions. So, I write some for me and my use to ISPCP API. Its only little feature, but useful for me :)

Code is below. Maybe, you can think about implement this to new version, new release of ISPConfig, it may be useful for many other users using and programming with ISPCOnfig API.

If is this wrong place to this thread or this topic, Im sorry and please, help me, where to post this :)

Thanks for much.


PHP Code:

public function sites_ftp_get_all_by_domain($session_id$domain_id)
$this->checkPerm($session_idsites_ftp_user_get')) {
permission_denied', 'You do not have the permissions to access this function.);
$domain_id intval($domain_id);

$sql "SELECT ftp_user_id, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, server_id, username, password, quota_size, active, dir FROM ftp_user WHERE parent_domain_id=$domain_id";
$all $app->db->queryAllRecords($sql);

Placed in /usr/local/ispconfig/interface/lib/class/

till 6th December 2011 15:33

Thanks for the function! I've added it as feature request to the bugtracker.

branov 6th December 2011 19:42

:) Thanks, Im happy I could help. Maybe I add another features while I will write our new system based on ISPCP and something will missing to me and can be helpfull for someone else.

till 6th December 2011 19:43

I guess you meant ISPConfig? ISPCP is a different open source control panel :)

branov 6th December 2011 19:59

Of course, ISPConfig :) Im sorry, I dont know about it, that exist similar system named ISPCP :)

All times are GMT +2. The time now is 17:16.

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