On 2006-12-29, at 0233, Yahoo User wrote:

Hi all, im trying to modify the source to add a custom field when a user is created... IE... on the web admin when u create a new user the admin is also asked to put an ID number in... just a simple field, so here goes my theory, i did a search on all source files for gecos, then i created similar fields. ie instead of pw_gecos i would add pw_idnumber... i finish editing all the files and i get unusual errors when i try to compile. Errors such as.

*structure has no member named `pw_Idnumber'
*vadddomain.c:74: warning: passing arg 5 of `vadduser' makes pointer from integer without a cast
Anyone out their that can help me on this ? im not too great at programming.

leave the source code alone.

whatever scripting your current user interface uses to create the mailbox, i'm assuming that at some point it calls the "vadduser" command (or sends an "add_user" command to vpopmaild) to actually create the mailbox. IN YOUR SCRIPT, after this step is done, add a step which does an explicit SQL query to fill whatever fields you need filled.

this way, when/if you decide to upgrade vpopmail to a newer version, you won't have to make the same source code patches there as well.

and if you're manually using qmailadmin to create the users, then by "script" i am referring to the explicit list of steps that you follow in order to create a mailbox. therefore, when i say "add a step to the script" i'm actually saying "train yourself and your employees who create mailboxes to...".

| John M. Simpson    ---   KG4ZOW   ---    Programmer At Large |
| http://www.jms1.net/                         <[EMAIL PROTECTED]> |
| http://video.google.com/videoplay?docid=-4312730277175242198 |

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to