Mukhbir

 
  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • green color
  • blue color

Add custom field for user data ( joomla 1.0 tested )

E-mail Print PDF

This process ads new fields to joomla for users, like age, address etc.

after adding them to core, they can be shown and accessed normally through registration page or account details.



Ths have been tested on:

1. joomla 1.0

2. field added and then edited from account manager (not shown in registration)



1. Add to the database

Goto joomla database > jos_users > simply add new field in the table with any name (e.g: address)

2. goto > joomla directory > includes > joomla.php

search for this line:

class mosUser extends mosDBTable {



add this after that line:

/** @var our new variable*/
var $our-variable-name = null;

 

3. goto > joomla directory > com_user > user.php

look for:

$row->email



this will be found twice in 2 lines (total four times)

simply copy those two lines and paste below it with our variable name.

e.g:

$row->email = trim( $row->email );

$row->address = trim( $row->address );




4.goto > joomla directory > com_user > user.html.php

and add new input field according to the design.

 

5. and same to be done in admin.users.html.php

to show user data in admin panel


 

Comments (1)Add Comment
0
Mike
May 08, 2009
24.215.229.197
Votes: +0
...

Worked well, although I had to do the same changes you recommend for com_user to com_register

Write comment
 
  smaller | bigger
 

busy