phpbb-extensions / autogroups Goto Github PK
View Code? Open in Web Editor NEWAuto Groups extension for phpBB
Home Page: https://www.phpbb.com/customise/db/extension/auto_groups/
License: GNU General Public License v2.0
Auto Groups extension for phpBB
Home Page: https://www.phpbb.com/customise/db/extension/auto_groups/
License: GNU General Public License v2.0
Submitting Auto Groups settings with 0 min and 0 max at the same time yields the following issues:
Posts type:
All board members are added to the group. Technically this is correct, if all users have at least 1 post, and there is no maximum limit. But it also seems illogical.
User Age type:
All board members are added to the group. This is also correct, since all users are older than 0 but is sort of the same issue as with posts.
Warnings type:
SQL ERROR [ mysqli ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR ug.group_id = '12') AND u.user_type NOT IN (1, 2) GROUP BY u.user_id' at line 1 [1064]
SQL
SELECT DISTINCT u.user_id, u.user_warnings FROM (phpbb_users u) LEFT JOIN phpbb_user_group ug ON (u.user_id = ug.user_id) WHERE (() OR ug.group_id = '12') AND u.user_type NOT IN (1, 2) GROUP BY u.user_id
The main bug to fix is with Warnings. But I think it may also be worth not allowing 0 values for both max and min to be allowed at the same time, since that could inadvertently auto group all a board's users.
Inactive User type class ? Was requested by a user though not part of our original plans. Add users after a period of inactivity to a group.
Possible selectors:
user_lastvisit
is a timestamp reflecting the last time a user logged in. This could be used in cron to add users. But it should probably also be called at login to remove a user (since they've just become active again). If the value is 0, it means the user has never logged in.
user_inactive_time
is a timestamp set when a user account is deactivated (or just never activated). I'm not sure if this is worth including since it refers to accounts that most likely were just never activated in the first place, and never did anything. If the value is 0, it means the user account is activated. The timestamp is only recorded when an account requiring activation is created, or if an Admin deactivates an account.
Provide documentation to ext authors on how they can extend auto groups to use in their own extensions.
I got an error log where this happens a lot:
PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (99-0-9999) at position 6 (9): Unexpected character in ext/phpbb/autogroups/conditions/type/birthdays.php:114
move cron, notification and type services into separate service files
See PR #33
Hello. How to make the autogroup automatically add users, otherwise you have to constantly synchronize data?
Constantly manually synchronizing data is somehow not right, this should be done by the extension itself, that's what it is intended for, but it turns out that the functionality is not complete ...
The example does not have the service definitions within single quotes
We should be including the www.
in the composer.json. This might apply to the other extensions too but I haven't checked.
Hi,
i have tested your extension, and it appears that if a user changes of default group with this extension, his avatar isn't replaced by that of the new default group.
Check post count on post approval
https://www.phpbb.com/customise/db/extension/auto_groups/support/topic/198801
I would like to have some kind of auto-groups that are not based on "numerical" data. I am talking about the possibility to ADD new auto-group types myself that are NOT integer based.
I have not looked at it at full depth, but I see there is no way to enter "selection criteria" other than min and (optional) max integer values. This rules out things like "if user has rank 1, 3 or 7, add to group 10" or "if profile field blah has value blahblah then add user to group hasblahblah".
Note that I am looking for ways to EXTEND the extension (as you describe in the wiki) by using other types of criteria. Maybe if the extension would provide some PHP events and Template events (plus the option to have "conditional" areas in the ACP depending on the auto-group type) that would be possible.
Unit test the controller class and functional tests ?
Replace ⌘
with ⌘ since it should be UTF8 character.
Use an event to run the membership check for a specific user when they visit, so they can be immediately added or removed from a user group based on the length of their membership.
Currently this is just checked by cron jobs and after registering. It should also be checked when the user is logged in or becomes active on the board.
Currently we have an option to exempt user groups from losing their default state if autogroup is set to bacome the default one.
There can be the cases when administrator wants individual users (user groups) to be exempted from autogrouping at all eventhough they (their members) comply existing autogroups rules.
We could want to add this option to the extension, although I'm not sure if this option should be per-group-based or global-based, or both.
If you have many groups, they do not fit it standard VARCHAR(255) config_value, when you set which groups do not qualify for autogroup. I had to extend it to VARCHAR(512).
In rare cases where a user does not belong to any group, Auto Groups triggers a PHP notice when trying to test if that user belongs to any groups due to the array being null during in_array() at these lines:
https://github.com/phpbb-extensions/autogroups/blob/master/conditions/type/base.php#L187
https://github.com/phpbb-extensions/autogroups/blob/master/conditions/type/base.php#L193
We should makes sure that $user_groups[$user_id]
is always an array.
User Age type class ?? (called via daily cron, using user_birthday)
Hi,
i think the "Resynchronize" action in "Manage Auto Groups" page in ACP should check the group default option if it’s set to "Yes".
With the setting to exclude particular groups, every time it updates the groups, it adds my moderator accounts to the other member groups I have set up by membership date even though it states those groups were selected to be excluded.
hello,
in your logic, you have chosen autogroups_max_value == 0
as the mechanism of disabling automatic removal from the chosen usergroup.
unfortunately, i believe this value has meaningful significance. it could be used to remove users who have made one post.
would you consider using autogroups_max_value == -1
to disable automatic removal or perhaps adding a checkbox input to disable it? thanks
This is just a basic to-do list for Auto Groups:
Need to complete for Beta release:
user_regdate
) PR #18 & #19user_birthday
)user_warnings
) PR #25
core.mcp_warn_post_after
, core.mcp_warn_user_after
acp_users.php
(no event exists) and tidy_users()
(no event exists)Can be completed after Beta release:
user_lastvisit
and user_inactive_time
)Does not work on phpbb version 3.2.5 cz, can not add a group
screen1
http://timeshock0.sweb.cz/autogroups%201.png
screen2
http://timeshock0.sweb.cz/autogroups2.png
With PR #145 the Membership Days condition adds a user to the group if the minimum value is set to 0. This only works if the user gets immediate access to the account. With user activation or admin activation enabled, the account status is inactive which excludes the user from being added to the group. The Auto Groups extension would need to call this code whenever an account is activated, either by the admin or by the user.
I want remove autogroup complete from database and install a new one.
But reult to an error 500.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.