[Typo3] How to update fe_user usergroup

Peter Russ peter.russ at 4many.net
Fri Jun 3 14:15:26 CEST 2005


Jason Brock wrote:

> Hi,
> 
> Does anyone know how to update the "usergroup" field in the "fe_user" table?
> 
> I'm getting a list of the groups that the user is in:
> 
> $user_group = $GLOBALS['TSFE']->fe_user->user['usergroup'];
> 
> I'm testing to see if they're a member a required group, if they're
> not I want to update their profile so they're added to the group...
> 
> $query = "UPDATE fe_users SET group =
> '".$user_group.",".$theNewGroupId."' WHERE uid='".$user_uid."'";
> 
> But I'm having no joy -- even when I try to execute my sql in
> phpMyAdmin I get an error, I guess it's got something to do with the
> usergroup field being a tinyblob binary? -- can't find any doco or
> discussions, can anyone give me some pointers.... any suggestions?
> 
> thx,
> Jason.
> --

change group to usergroup in your query ;-)

$query = "UPDATE fe_users SET USERgroup 
='".$user_group.",".$theNewGroupId."' WHERE uid='".$user_uid."'";



More information about the TYPO3-english mailing list