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