Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 6th December 2011, 10:50
branov branov is offline
Junior Member
 
Join Date: Aug 2009
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Smile 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.

Code:

PHP Code:
public function sites_ftp_get_all_by_domain($session_id$domain_id)
        {
        global 
$app;
                if(!
$this->checkPerm($session_idsites_ftp_user_get')) {
                $this->server->fault('
permission_denied', 'You do not have the permissions to access this function.);
            return 
false;
                }
        
$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);
         return 
$all;
        } 
Placed in /usr/local/ispconfig/interface/lib/class/remoting.inc.php
Reply With Quote
The Following User Says Thank You to branov For This Useful Post:
till (6th December 2011)
Sponsored Links
 

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
Slow download from own FTP (vsftpd + proftpd) Overcrook Installation/Configuration 0 12th January 2010 21:41
FTP tag vanished from website setup coolen Installation/Configuration 9 12th October 2008 11:35
Question about Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Debian Etch ikkem HOWTO-Related Questions 30 26th February 2008 19:38
Website without domain name Pepere General 2 25th November 2006 14:32
ftp problems tgansert Installation/Configuration 20 27th May 2006 19:06


All times are GMT +2. The time now is 11:46.


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