hi, maybe it is very simple but how can i get user name from user table to my edit_Recorde page.
i use
<?php $user =& JFactory::getUser();
echo "{$user->id}"; ?>"
it gave me my id i need user name how can i get it from user table
sorry for simple question🙂
i use
<?php $user =& JFactory::getUser();
echo "{$user->id}"; ?>"
it gave me my id i need user name how can i get it from user table
sorry for simple question🙂
Hi Kurt2000,
Bob
<?php
$user =& JFactory::getUser();
echo "Your id is ".$user->id;
echo "<br />";
echo "Your name is ".$user->name;
?>
Bob
sorry bob but this not thing i asked.. this gives my id and my name at session time
but i want connectivety shows user name .. but i can only see id from table jos_content however user name at jos_user .. how can i show it
thx
but i want connectivety shows user name .. but i can only see id from table jos_content however user name at jos_user .. how can i show it
thx
<?php
$database->setQuery( "SELECT * FROM #__sections" WHERE id = "{sectionid}" );
$sections = $database->loadObjectList();
foreach($sections as $sections){
?>
doesnt work
Hi Kurt2000,
I'm not sure that I'm understanding your questions clearly.
If you want find the name of a user from their id then you can use
Where are you using the SQL? You probably can't use the {field_name} syntax in there but need to get the section id from
Bob
I'm not sure that I'm understanding your questions clearly.
If you want find the name of a user from their id then you can use
$user_2 =& JFactory::getUser($id);
Where are you using the SQL? You probably can't use the {field_name} syntax in there but need to get the section id from
$sectionid = JRequest::getInt('sectionid');
. . .
WHERE `id` = $sectionid
. . .
Bob
user send a form and my moderator has to control it ok.. i use both
chrono forms and connectivity. in connectivity and edit form (which is a chrono form also) there is a form posted before and it has fields like created_by sectionid ext. in edit form i want to show user name which related with jos_user table and in my jos_content table i ve user_id
now
it is possible to show user name in edit form and chronoview ?
chrono forms and connectivity. in connectivity and edit form (which is a chrono form also) there is a form posted before and it has fields like created_by sectionid ext. in edit form i want to show user name which related with jos_user table and in my jos_content table i ve user_id
now
it is possible to show user name in edit form and chronoview ?
Hi Kurt,
Yes, if you have a user id as say $id then you can use
Bob
Yes, if you have a user id as say $id then you can use
$user_2 =& JFactory::getUser($id);
to get information for that user then $user_2->name will give you their name.Bob
This topic is locked and no more replies can be posted.