getting more columns in com_user/user.php:userEdit();
Posted: Fri Nov 09, 2007 9:40 am
I'm trying to edit the "Your details" page, I've added another column in jos_users table, which I named "address".
Now I'm trying to recieve the data in that column when a user is editing his details.
I'm 100% sure this is the function I need to change, if I add $row->address = "testtest"; after $row->username = trim( $row->username );, the address field will contain "testtest", but how can I recieve the data that's in the database column "address"?
Sorry if my english sucks
I've added the function userEdit below.
Now I'm trying to recieve the data in that column when a user is editing his details.
I'm 100% sure this is the function I need to change, if I add $row->address = "testtest"; after $row->username = trim( $row->username );, the address field will contain "testtest", but how can I recieve the data that's in the database column "address"?
Sorry if my english sucks
Code: Select all
function userEdit( $option, $uid, $submitvalue) {
global $database, $mainframe;
global $mosConfig_absolute_path;
// security check to see if link exists in a menu
$link = 'index.php?option=com_user&task=UserDetails';
$query = "SELECT id"
. "\n FROM #__menu"
. "\n WHERE link LIKE '%$link%'"
. "\n AND published = 1"
;
$database->setQuery( $query );
$exists = $database->loadResult();
if ( !$exists ) {
mosNotAuth();
return;
}
require_once( $mosConfig_absolute_path .'/administrator/components/com_users/users.class.php' );
if ($uid == 0) {
mosNotAuth();
return;
}
$row = new mosUser( $database );
$row->load( (int)$uid );
$row->orig_password = $row->password;
$row->name = trim( $row->name );
$row->email = trim( $row->email );
$row->username = trim( $row->username );
$file = $mainframe->getPath( 'com_xml', 'com_users' );
$params =& new mosUserParameters( $row->params, $file, 'component' );
HTML_user::userEdit( $row, $option, $submitvalue, $params );
}