Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/12230] Disable newly registered group when post limit is set to 0 #3659

Merged
merged 1 commit into from Aug 27, 2016

Conversation

Elsensee
Copy link
Contributor

Old PR: #3553
Older PR: #3536

Now all users are just removed from the group when the limit is set to 0. :)

PHPBB3-12230

@Nicofuma Nicofuma modified the milestone: 3.1.5 May 29, 2015
}
$db->sql_freeresult($result);

if (sizeof($user_ids))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!empty

@bantu
Copy link
Collaborator

bantu commented May 29, 2015

Not sure this behaviour is desired. Any reviews please make sure to have read #3553 (comment)

@Nicofuma
Copy link
Member

Nicofuma commented Jun 6, 2015

@bantu which behaviour would you have instead?

@nickvergessen nickvergessen modified the milestones: 3.1.5, 3.1.6 Jun 11, 2015
@Elsensee
Copy link
Contributor Author

Elsensee commented Aug 1, 2015

bump?

@Nicofuma Nicofuma modified the milestones: 3.1.6, 3.1.7 Sep 5, 2015
@Elsensee
Copy link
Contributor Author

bump? :/

@marc1706
Copy link
Member

@bantu pls answer the above question ;)

@gn36
Copy link
Contributor

gn36 commented Dec 8, 2015

I believe you can find his answer in his linked comment above, since it is basically the same problem: If you remove all users from the newly registered group, this makes it hard on Administrators who simply want to manage the users in that group themselves, instead of having it automatically managed. They will have to re-add all users they want in this group.

In that sense, the 0 would only disable the automatic adding and removing feature, not remove all users from the group as well.

I think you could argue for both cases, because a lot of administrators setting this to 0 will probably want to remove all users from that group at the same time, but whatever the choice is, administrators should be informed about this behaviour in the description.

@marc1706
Copy link
Member

marc1706 commented Dec 9, 2015

I think that most admins will expect the newly introduced behavior for setting this to 0. The explain string should however clearly state that this will remove all members from the newly registered users group.

@rxu
Copy link
Contributor

rxu commented Dec 9, 2015

I'd better just add a conditional around https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/phpbb/session.php#L1586-L1589 to carry out removing user from the NEWLY_REGISTERED if $this->data['user_new'] && $config['new_member_post_limit'] == 0.
This way we won't change default behavior and user will be removed from newly registered on his 1st visit after disabling the feature.

@gn36
Copy link
Contributor

gn36 commented Dec 9, 2015

I think that most admins will expect the newly introduced behavior for setting this to 0.

I agree.

user will be removed from newly registered on his 1st visit after disabling the feature.

I think removing the users after disabling is changing the default behaviour far more than removing them all at once. In that case, the newly registered users group cannot be used by the administrator at all, while now, they can simply manage users in that group themselves.

@rxu
Copy link
Contributor

rxu commented Dec 9, 2015

I think removing the users after disabling is changing the default behaviour far more

This is just how it works currently for the limit >0. And it can work same way for the limit = 0.

In that case, the newly registered users group cannot be used by the administrator at all

Why is that?

@gn36
Copy link
Contributor

gn36 commented Dec 9, 2015

Because users that are manually added to the group by the administrator are immediately removed again automatically whenever they log in if the setting is 0.

@rxu
Copy link
Contributor

rxu commented Dec 9, 2015

They won't be removed because $this->data['user_new'] is not set for them 😉

P.S. I guess it's as simple as removing && !empty($config['new_member_post_limit']) from the condition.

@nickvergessen nickvergessen modified the milestones: 3.1.7, 3.1.8 Dec 13, 2015
@Elsensee
Copy link
Contributor Author

Elsensee commented Jan 6, 2016

Please see PR #3553. I suggested a similar change there.

@nickvergessen nickvergessen removed this from the 3.1.8 milestone Feb 13, 2016
@nickvergessen nickvergessen modified the milestones: 3.1.9, 3.1.8 Feb 13, 2016
@Nicofuma
Copy link
Member

@Elsensee what's up here?

@Nicofuma Nicofuma modified the milestones: 3.1.9, 3.1.10 Apr 12, 2016
@Elsensee
Copy link
Contributor Author

@Nicofuma to be honest, I don't really know. There is also a patch #3553 which fixes this as @rxu has described it.
Maybe we should ask guys over at area51 how they think we should do it. (and if we should do it at all, but I can assume what their reaction will be ;) )

Maybe our new TL @marc1706 has anything to say about this?

@marc1706
Copy link
Member

@Elsensee I think I actually clearly stated the expected behavior here? Feel free to chat me up on IRC to clear anything up

@Elsensee
Copy link
Contributor Author

<Elsensee> Marc: regarding this: https://github.com/phpbb/phpbb/pull/3659 the question is, should we remove all users at once from the group after the admin has set this setting to 0 or should the users be removed from the group, the next time they visit the board?
<Elsensee> they are very similar and personally I'd just go for the second option as there are less mistakes to be made
<Marc> The latter one, especially due to the large query option 1 might cause
<Elsensee> Marc: good, me thinks the same :)

@Elsensee Elsensee closed this May 15, 2016
@marc1706
Copy link
Member

Reopened as I think you clicked on close and comment by accident?

@marc1706 marc1706 reopened this May 15, 2016
@Elsensee
Copy link
Contributor Author

Okay, we now got the same solution as in #3553. The administrator can still manage the group by himself because, as @rxu pointed it out, user_new is only set for really new users.

@Elsensee Elsensee removed the WIP 🚧 label May 17, 2016
@Elsensee
Copy link
Contributor Author

Elsensee commented Aug 5, 2016

bump?

@Elsensee
Copy link
Contributor Author

Bump?

marc1706 added a commit to marc1706/phpbb that referenced this pull request Aug 27, 2016
[ticket/12230] Disable newly registered group when post limit is set to 0
@marc1706 marc1706 merged commit 559325f into phpbb:3.1.x Aug 27, 2016
@Elsensee Elsensee deleted the ticket/12230 branch August 29, 2016 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants