[Typo3-dev] Blob Fe_users Fe-usergroups

Alain arwebmail at skynet.be
Wed Jun 15 10:54:11 CEST 2005


JoH a écrit :
>>In the typo3 mysql database, the fe_users table contains a blob field
>>(usergroups) where you can find all the groups to which the user
>>belongs.
>>
>>Can someone tell me how this blob field is calculated ? When I export
>>the data with phpMyAdmin under the CSV format, I can read the list for
>>the  usergroups field (fe : (1,5,12)) but when I export under the SQL
>>format I can't see how it is calculated.
> 
> 
> Nothing is "calculated" here.
> It's just a CSV list containing the uids of all groups the user should be a
> member of.
> Since it is used as a DB relation TYPO3 sets the field type to blob by
> default (really don't know the reason why, could be a simple text field
> too).
> 
> Joey
> 

Thank you for all the answers.
In fact the problem is the following.
I use the Export function of phpMyAdmin.

If I do an export using the classical SQL format, here is what I get :

INSERT INTO fe_users (uid, pid, tstamp, username, password, usergroup,
disable, starttime, endtime, name, address, telephone, fax, email,
crdate, cruser_id, lockToDomain, deleted, uc, title, zip, city, country,
www, company, image, TSconfig, module_sys_dmail_category,
module_sys_dmail_html, fe_cruser_id, lastlogin, is_online)
VALUES
(9, 7, 1073570013, 'user', 'password', 0x312c31322c3133, 0, 0, 0,
'name', 'adresse1', 'tel1', 'fax', 'email', 1073570013, 1, '', 0, '',
'title', 'zip', 'city', 'country', '', '31170029', '', '', 0, 0, 0,
1117722611, 1117722611);


If I export using the csv format, here is what I get for the same record  :
"9";"7";"1073570013";"user";"password";"1,12,13";"0";"0";"0";"name";"adresse1";"tel1";"fax";"email";"1073570013";"1";;"0";;"title";"zip";"city";"country";;"31170029";;;"0";"0";"0";"1117722611";"1117722611"

If you look at the field named usergroup with SQL you have the following
value 0x312c31322c3133 and with CSV : "1,12,13"
The second is a list of groups in a readable form.

How can I transform my list "1,12,13" in the format 0x312c31322c3133 ?

Can I do an Insert
INSERT INTO fe_users (uid, pid, tstamp, username, password, usergroup,
disable, starttime, endtime, name, address, telephone, fax, email,
crdate, cruser_id, lockToDomain, deleted, uc, title, zip, city, country,
www, company, image, TSconfig, module_sys_dmail_category,
module_sys_dmail_html, fe_cruser_id, lastlogin, is_online)
VALUES
(9, 7, 1073570013, 'user', 'password', (1,12,13) , 0, 0, 0, 'name',
'adresse1', 'tel1', 'fax', 'email', 1073570013, 1, '', 0, '', 'title',
'zip', 'city', 'country', '', '31170029', '', '', 0, 0, 0, 1117722611,
1117722611);
instead of
(9, 7, 1073570013, 'user', 'password', 0x312c31322c3133, 0, 0, 0,
'name', 'adresse1', 'tel1', 'fax', 'email', 1073570013, 1, '', 0, '',
'title', 'zip', 'city', 'country', '', '31170029', '', '', 0, 0, 0,
1117722611, 1117722611);

Regards.

Alain Reymond




More information about the TYPO3-dev mailing list