Converting All registered user to New registered users

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Converting All registered user to New registered users

Postby yaashul » Sat Nov 28, 2009 4:28 am

I like the feature "Newly Registered Member". All posting of new registered member which has less than a certain no of post will need to be aproved. But my question is that there are 1000 of Old Registered users which have only 0 (Zero) post. They can still post without approval. Is there any way I can convert those users into newly Registerd user?
yaashul
PR1
PR1
 
Posts: 159
Joined: Wed Aug 29, 2007 1:21 am

Advertisement

Re: Converting All registered user to New registered users

Postby GoBieN » Sat Nov 28, 2009 10:41 am

something like:
update group=newly registered where user_posts=0

But with correct syntax and values.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Re: Converting All registered user to New registered users

Postby yaashul » Sat Nov 28, 2009 3:33 pm

Can some please tell what would be exact query?
yaashul
PR1
PR1
 
Posts: 159
Joined: Wed Aug 29, 2007 1:21 am

Re: Converting All registered user to New registered users

Postby GoBieN » Sun Nov 29, 2009 10:55 am

PLEASE BACKUP YOUR DATABASE (or at the very least your users table) FIRST ! I am not responsible for the turnout, good or bad.
I assume your table prefix is phpbb_ if it's different please adjust the query's.

In my board the group_id for NEWLY_REGISTERED is 1087. Please verify for yourself with the below query.
Code: Select all
SELECT group_id, group_name FROM phpbb_groups WHERE group_name = 'NEWLY_REGISTERED'


If it is also 1087 you can run the query below, it it's different please adjust the number below.
Code: Select all
UPDATE phpbb_users SET group_id=1087 WHERE user_posts = 0

This query will update the group_id on every user who has 0 posts !
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Re: Converting All registered user to New registered users

Postby yaashul » Sun Nov 29, 2009 11:08 am

Nope it didn't worked...it has changed all user group in database but in phpbb it is showing as Registered member only... I think there must be another query for phpbb_user_group table...
yaashul
PR1
PR1
 
Posts: 159
Joined: Wed Aug 29, 2007 1:21 am

Re: Converting All registered user to New registered users

Postby GoBieN » Sun Nov 29, 2009 3:44 pm

You have to enable it first in the ACP.
Under User Registration Settings.
Newly registered member limit: when set to 0 is disabled. And just below you have to enable the newly_registerd to be default group.

If after that it still doesn't work i suggest you install the "Support tool kit". It has a tool specially for synchronizing the newly registered users witht he limit settings from ACP.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Re: Converting All registered user to New registered users

Postby yaashul » Sun Nov 29, 2009 4:01 pm

I got the answer.. the query would be...

Code: Select all
UPDATE phpbb_users, phpbb_user_group SET phpbb_users.group_id = '8', phpbb_user_group.group_id = '8' WHERE ( phpbb_users.user_id = phpbb_user_group.user_id AND phpbb_users.group_id = phpbb_user_group.group_id AND phpbb_users.user_posts = 0 AND phpbb_users.group_id = 2 )


In this example 2 is the group_id of registered users and 8 is the group_id of Newly registered users.
yaashul
PR1
PR1
 
Posts: 159
Joined: Wed Aug 29, 2007 1:21 am

Re: Converting All registered user to New registered users

Postby GoBieN » Sun Nov 29, 2009 4:09 pm

Ah i didn't even notice there was a table called phpbb_user_group. It makes sense though, since a user can have multiple groups.

But the Support tool kit is quite nice, and installs in only 1 minute (it's just upload a folder and optionally add a link).
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Re: Converting All registered user to New registered users

Postby yaashul » Sun Nov 29, 2009 4:13 pm

Support Kit is quite nice.. Its just that user_group feature doesn't work if you have mod_secuirty installed on ur hosting so this support kits will actually never run always gives 406 error
yaashul
PR1
PR1
 
Posts: 159
Joined: Wed Aug 29, 2007 1:21 am

Re: Converting All registered user to New registered users

Postby GoBieN » Sun Nov 29, 2009 4:34 pm

yaashul wrote:Support Kit is quite nice.. Its just that user_group feature doesn't work if you have mod_secuirty installed on ur hosting so this support kits will actually never run always gives 406 error

maybe you can report this to the author so he can find a way around that limitation.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 15 guests