A couple of weeks ago I was in a bar around Freiburg and it was freezing cold outside. Looking through their menu card I was in a situation I could not decide for a hot drink or one of their fancy (unfortunately freezing cold) cocktails. I remembered that I got some caipi glasses a couple of years ago with some fabric applied for hot drinks. So I asked myself if it would be possible to create a hot caipirinha cocktail. And it absolutely is possible :-) I guess somebody else had that idea before so I would not say I invented it, but I want to spread the word. So have a try!
Hot Caipirinha Cocktail – The recipe
7cl Cachaca (I absolutely prefer Ypioca)
2 heaped teaspoons of brown sugar
Cut the lime into 12 pieces and use 9 of them for the drink. Put them into a caipirinha glass and add the sugar. Squeeze the limes thoroughly with a pestle. Afterwards add the Cachaca and stir it well. Now slowly fill the glass with the hot water and stir simultaneously. Enjoy your hot caipirinha cocktail. But be aware it may hit you :-)
I recently had the task to clean up a TYPO3 instance with round about 25000 frontend users. The goal was to reduce the 40 TYPO3 frontend groups to a minimum as the security policy changed. So the most of these groups have been deleted. As the user has to be part of at least one group to be able to login to the frontend, I had to assure that each user is member of a basic group. You can imagine I did not want to do that by hand in the TYPO3 backend for 25000 TYPO3 frontend users. So I thought about a possibility to do that with an SQL query.
Get started with the TYPO3 group juggling job
Let’s assume the basic TYPO3 group is number 2. We want to add this group to everybody who is not a member. We have to pay attention to two constraints:
- The group should not be added to accounts which are already members
- If there exist accounts without any group membership we have to add these first
This results in two queries. Number one adding the group to all accunts with an empty „usergroup“ column. Number two adds „2,“ upfront all the other groups for all accounts not in group number 2.
- UPDATE fe_users SET usergroup=“2″ WHERE usergroup = „“;
- UPDATE fe_users SET usergroup=CONCAT(‚2,‘ , usergroup) WHERE FIND_IN_SET(‚2‘, usergroup) = 0;
As always: Try it on a testsystem upfront and make a backup of your database before you use this in real life. Beside that: Have fun…
If you had problems following this TYPO3 tutorial, please let me know in the comments. If it helped you or you think it can help others feel free to spread the word by sharing and liking the article. It also would help me improving the upcoming posts.