A Flarum extension. Assign a default group to new users automatically.
Install manually with composer:
composer require fof/default-group:"*"
composer update fof/default-group
An extension by FriendsOfFlarum.
A Flarum extension. Assign a default group to new users automatically.
Home Page: https://discuss.flarum.org/d/18158
License: MIT License
A Flarum extension. Assign a default group to new users automatically.
Install manually with composer:
composer require fof/default-group:"*"
composer update fof/default-group
An extension by FriendsOfFlarum.
之前似乎没考虑到这种情况
Required before beta 16
Current Behavior
Because of flarum/framework#2713, the Activated
event runs multiple time. This extension always adds the group every time the event is dispatched without checking if the user already has the group.
Steps to Reproduce
I have not reproduced myself but the error has been seen here clarkwinkelmann/flarum-ext-passwordless#9
It should be reproducible by changing email and validating new email, or by logging in with the Passwordless extension.
It results in an error like Integrity constraint violation: 1062 Duplicate entry '1-6' for key 'PRIMARY'
trying to re-insert the same group-user relationship.
Environment
Possible solution(s)
We need to check whether the group is already added in https://github.com/FriendsOfFlarum/default-group/blob/master/src/Listeners/AddDefaultGroup.php
Even if the issue about duplicate event is fixed in Flarum, this is still a necessary fix in case a different extension would add the same group before this extension runs.
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.