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.
Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 6th December 2011, 14:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,622
Thanks: 792
Thanked 4,990 Times in 3,908 Posts
Default

Thanks for the function! I've added it as feature request to the bugtracker.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 6th December 2011, 18:42
branov branov is offline
Junior Member
 
Join Date: Aug 2009
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
Reply With Quote
  #4  
Old 6th December 2011, 18:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,622
Thanks: 792
Thanked 4,990 Times in 3,908 Posts
Default

I guess you meant ISPConfig? ISPCP is a different open source control panel
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 6th December 2011, 18:59
branov branov is offline
Junior Member
 
Join Date: Aug 2009
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Of course, ISPConfig Im sorry, I dont know about it, that exist similar system named ISPCP
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
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 17:13.


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