![]() |
Convert Secondary UserGroup to Primary UserGroup
I'm looking for an easy way to convert a secondary usergroup to the primary usergroup for a group of members. All are in the same usergroup, but are currently listed as secondary users. In order to be able to build a mailing list or mail the users, they have to be listed as primary users of the group, so I need to know how to convert their primary usergroup.
They are currently listed as primary usergroup: Registered with secondary usergroup: Club Owner I need their primary usergroup to be Club Owner. |
If people in this group have a custom usertitle of for example Club Owner, you might wanna select on that.
|
Quote:
|
I figured out what you mean, you can build a mailing list based on a user title. I tried that and out of about 200 users that are in that user group (both primary and secondary users) that pulled about 69 (about 9 more than are listed as primary users) :(
I need some way to just convert all those secondary users to primary users, short of going through each one individually and doing it by hand. |
I mean that you can select on the user title when generating a mail list, so if this group got a unique user title, you could use that to select the members for the mailing.
|
I got a better solution for you :D
Do the following modifications in your includes/adminfunctions_user.php (2 edits) and you will be able to select your users for the mailing also based on secondary membergroups. In file includes/adminfunctions_user.php Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
No feedback? Did this solve your problem?
|
Thanks, I'll give it a try.
|
I tried another hack for this that didn't work; I will try yours soon and will definitely come back with feedback. This is a much-needed feature... I can't believe it's not part of VB, for some reason I was under the impression it was, - right up until I actually needed it... what a rude awakening that was.
I have already changed the one group by hand, 224 of them, but I would still like to be able to email other now-secondary groups.... cross everything! :D I got Quote:
Running vb3.07 and CMPS 1.0...1? (newest one...) |
I think you missed something in the second change in the file.
Please double check you edit |
I probably had a piece of the first hack left, Huang's, which I have since gotten to work.... thanks!
|
This works like a charm Marcoh!
Any idea how to do the check box that turns them all on or all off like the primary group has? Thanks so much man! |
Quote:
PHP Code:
PHP Code:
|
Quote:
|
Well, I added this to my website and it works great! I'll check out your Thread of the Week Hack next. Thanks!
|
Thanks, maybe i should release this as a hack instead of just an answer in a thread.
|
Quote:
This works great. Thank you very much MarcoH64. Much appreciated. This should be noted by the vB staff and added as a next function in their upcoming releases :) |
Hehe, a bit late for 3.5, but nice that it works for you. :D
|
Quote:
|
I might have a look at it. Bump me again if i forget. :D
|
Quote:
Edit: I figured I'd give it a go. It seems to work.:) |
works like a dream xcept one of my primary users in that group wont get the message, why is that?? wierdf!
|
If only 1 didn't get the message, the problem must be on his side.
|
no no, you know how in vBulletin it shows who has been emailed, well over there.. it didnt list his name... why?? he is primary of that group.
|
Sorry i don't understand you.
|
great hack. thought it was working on 3.5.4
but get this error when try to send out an email Code:
Database error in vBulletin 3.5.4: |
no support? No worries. removed the code from my forum. Good idea. Wish I could get it to go with 3.5.4.
|
Quote:
REPLACE by: PHP Code:
hope that helps, should actually be a standard feature of next vB if you ask me! |
I’ve same problem https://vborg.vbsupport.ru/showthrea...473#post975473
MySQL Error : Column: 'usergroupid' in where clause is ambiguous Error Number : 1052 Tylneyt I’d hoped that your add will help me but after the code modification, the problem persists ?Any idea of what I would do? I’m running vb 3.5.0 with MarcoH64’s modification I don’t want to undo the MarcoH64’s code edition as it is very useful in my forum, but now I can’t send mails to primarygruop members :( |
That works beautifully! One would think this would be standard issue with vB.
Thanks! |
I've tried this hack, but when I only select an Additional Usergroup that only has 6 people in it, it instead emails all 1600 users.
Running v3.5.4 here with the hacks as listed by Marco and tylneyt. I had to leave these lines below commented out as otherwise they would cause the crash smdani was seeing above. $condition .= ' AND (' . implode(' OR ', $u_condition) . ')'; unset($u_condition); Any help?? Thanks. Scott |
Quote:
|
Now that 3.6.0 is out, does anybody have any experience with this hack in 3.6.0?
|
I had to do this for 3.5.4 -- its also apparently good practice to add intval to the condition....
REPLACE by: PHP Code:
|
All times are GMT. The time now is 04:34 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|