Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Ben Johns on July 16, 2002, 05:44:06 AM
-
I'm wondering how to customise the user account fields is E-Smith 5.5.
I used to be able to modify the /etc/e-smith/web/functions/directory and /etc/e-smith/web/functions/useraccounts and the changes would be passed to the /home/e-smith/accounts automagically (w/4.1.2). Now I do the same and the existing fields stay the same in the accounts file yet the changes are displayed in the web interface (like expected).
So what I want is to change the fields "COMPANY" to "Pre-Paid_Mb" and "STREET" to "Berth_No" and have these carried through to the accounts file etc for accounting purposes.
Thanks in advance!
Ben
-
Ben,
What you need to do is change this entry in
/etc/e-smith/web/functions/useraccounts line 348
COMPANY
Company
Change the label between the trans tags.
Jon
-
Thanks for the reply Jon,
I've tried what you've suggested and it still doesn't pass the results on to the accounts file:
test3=user|City|Ottawa|Company||Dept||EmailForward|local|FirstName|Test|ForwardAddress||Gid|5005|LastName|Test|PasswordSet|no|Phone|555-5555|Street||Uid|5005
As you can see, it doesn't place the entered values into the fields either. Which leads me to think that it's getting these values from somewhere other than the function (ldap maybe??). This change worked with pre v5 versions tho.
I've searched all over for info to no avail.
-
You are right, what I suggested just changes the label name. This looks like a good opportunity to get to know FormMagick a bit better. I will have a look and see what I can come up with.
Jon
-
I did a bit of snooping around in FormMagic (thnx for the reference) and made the following changes:
# now that we're down with the 411, let's set the values
$cgi->param(-name=>'FirstName', -value=>$fn);
$cgi->param(-name=>'LastName', -value=>$ln);
$cgi->param(-name=>'Yacht_Name', -value=>$dept);
$cgi->param(-name=>'Pre-Paid_Mb', -value=>$company);
$cgi->param(-name=>'Berth_No', -value=>$street);
$cgi->param(-name=>'City', -value=>$city);
$cgi->param(-name=>'Phone', -value=>$phone);
$cgi->param(-name=>'EmailForward', -value=>$emf);
$cgi->param(-name=>'ForwardAddress', -value=>$fwd);
In the file:
/usr/lib/perl5/site_perl/esmith/FormMagick/panel/useraccounts.pm, line 271.
These carry through and maintain their values. Very bodgy, but it seems to work for now (although I'm sure its going to come back and haunt me later, someone must have a more educated method in mind I hope.)
Thanks again Jon.