fix: self-registration not assigning to predefined group
This commit is contained in:
1 parent
40d224e8c0
commit
f93ea02975
1 file changed
+5
@@ -425,6 +425,11 @@ module.exports = class User extends Model {
|
||||
isVerified: false
|
||||
})
|
||||
|
||||
// Assign to group(s)
|
||||
if (_.get(localStrg, 'autoEnrollGroups.v', []).length > 0) {
|
||||
await newUsr.$relatedQuery('groups').relate(localStrg.autoEnrollGroups.v)
|
||||
}
|
||||
|
||||
if (verify) {
|
||||
// Create verification token
|
||||
const verificationToken = await WIKI.models.userKeys.generateToken({
|
||||
|
||||
Reference in new issue
Block a user