Forums

User table knowledge

kayrie 01 Dec, 2011
Hi guys,

What does mean by (gid) field name inside jos user table in db?
If we change it value will it effected our form?can your give some example if we change that value?
GreyHead 01 Dec, 2011
Hi Kayrie,

It's the Group ID for the user.

You should never change the jos_users table directly unless you know **exactly** what you are doing. And even then you should use the Joomla! User Object methods.

Bob
kayrie 02 Dec, 2011
Hi Bob,

So if we change the group id value what actually will happen?can your discuss little bit?
GreyHead 02 Dec, 2011
Hi Kayrie,

There's a small possibility that you will break your site; a bigger possibility that you will give your users access to areas that you didn't intend. If you don't know **exactly** what you are doing please don't edit the jos_users table.

Bob
kayrie 05 Dec, 2011
Hi Bob,

Thanks for your advice.
I wanna know what the uses of params field inside jos_user table?
Just to know in detail so it can archive my target..
Thank You..
GreyHead 05 Dec, 2011
Hi kayrie,

You can use the User Parameters for any simple data that you need. Remember that parameters are stored in an INI file with one name=value set on each line so you can't use long text items.

You should get and set parameters with the Joomla! User Object methods.

Bob
kayrie 30 Dec, 2011
Hye guys,
Just wanna to know how does we can list all the name and id from user table?
I mean it like drop down list that list all name from user table.
Because if we use
<?php
$user = JFactory::getUser();
$Name = $user->name;
?>

This only show one name.

Thank You.
GreyHead 30 Dec, 2011
Hi kayrie,

Joomle has a command for this, please see this post Use the code in a Custom element in CFv4.

Bob
kayrie 30 Dec, 2011
Hi bob,
can you give a brief what the meaning of this code line
echo JHTML::_('list.users', 'user_id', true, 0, NULL, 'name', false);

'list.users' = ?
really appreciate.
Thank You
GreyHead 30 Dec, 2011
Hi kayrie,

It's the Joomla! code to give you a select box list of all active users.

See the Joomla! docs here - though they aren't very helpful :-(

Bob
kayrie 03 Jan, 2012
i tried to use it.
But it store id, not name that been choices in table field in db.
How does it can store the name selected?
I'm using v3.
Really appreciate.
Thank You.
GreyHead 03 Jan, 2012
Hi kayrie,

If you have the ID then you can always look up the username or name using the Joomla! User Object.

If you *must* have the name then look that up in the On Submit Before Email box. Or hand-code the select box to use the username as a value.

Bob
This topic is locked and no more replies can be posted.