Working through the ISPConfig source code

Discussion in 'General' started by catdude, Aug 24, 2007.

  1. catdude

    catdude ISPConfig Developer ISPConfig Developer

    I am looking through the ISPConfig and Remote Framework source code in detail, trying to develop a feel for how a lot of things are done. Right now I'm working through the user addition process.

    I've walked through the Remote Framework code. Speficially in config_web.lib.php, I'm looking at the user_add function. I am following what it's doing right up til line 875. I assume this is creating an event to signal ISPConfig to write the added info out to the required disk files.

    I am also looking at writeconf.php, around lines 150 through 192. It looks like this is the function that gets called to write out the Postfix virtusertable file. The code in scripts/lib/classes/ispconfig_postfix.lib.php, function make_virtusertable, seems clear enough. What I am not seeing so far is where the mail user info gets written to /etc/passwd. Can anyone point me to that part of the code?

    My purpose for this is to troubleshoot the Remote Framework. As I posted last week, I can view records using the Framework but I am not able to add clients, webs, or users. I'd like to figure out why, and possibly even figure out a way to perform these actions by doing direct manipulation of the MySQL databases, just as user_add does, then call the required functions to get the new data flushed to the appropriate disk files.

    Any help that any of you can offer to a confused Perl programmer doing his first serious PHP work would be greatly appreciated.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have a look at the user_insert and user_update functions in /root/ispconfig/scripts/lib/classes/config.lib.php

    To debug this, you dont have to look at any files in /root/ispconfig. Just look at the files in /home/admispconfig/lib/classes/, especially ispconfig_web.lib.php and ispconfig_isp_user.lib.php which is the action class called by ispconfig_web.lib.php when a user is inserted.

Share This Page