Hi...I'd like to add a custom field on my XFile user database. Since my file server are commercialed through my forum site, I want my file server user fill their forum username when they register on my file server,or they can edit the field on their Account page.
Anyone can help me?Thanks.
XFileSharing Pro - Adding custom field on user database
-
- Posts: 15
- Joined: May 11, 2009 8:57 am
Re: Adding custom field on user database
1-pandusetiawan wrote:Hi...I'd like to add a custom field on my XFile user database. Since my file server are commercialed through my forum site, I want my file server user fill their forum username when they register on my file server,or they can edit the field on their Account page.
Anyone can help me?Thanks.
Sure you can, if you have phpmyadmin installed, just add the field from it in User table, else use your SSH root access to add the field and set the data type.
2-
you have to add in register.html + my_account.html template the user field text form for example.
3-
edit index.cgi file in cgi-bin folder located in Main Server :
Search this line :
Code: Select all
$db->Exec("INSERT INTO Users
Code: Select all
usr_login=?,
Code: Select all
your_field=?,
Code: Select all
$f->{usr_login},
Code: Select all
$f->{your_field},
4- Search this line again :
Code: Select all
$db->Exec("UPDATE Users
PS : you can verify if the field is empty or contain bad data via simple JS and some Regex
Keep a backup file before doing this changes
Correct me if I'm wrong.
Cheers,
Hamza.