Update usergroup before merging connections

This makes it so confirmed users that get their lock removed through changing to that account don't retain the lock symbol even though they're not locked
This commit is contained in:
Bär Halberkamp 2016-08-19 23:29:18 +02:00
parent beafb9d806
commit 127214230f

View File

@ -710,8 +710,6 @@ class User {
// This user already exists; let's merge
user.merge(this);
user.updateGroup(registered);
Users.merge(user, this);
for (let i in this.prevNames) {
if (!user.prevNames[i]) {
@ -790,6 +788,8 @@ class User {
if (oldUser.locked) this.locked = oldUser.locked;
if (oldUser.autoconfirmed) this.autoconfirmed = oldUser.autoconfirmed;
this.updateGroup(this.registered);
for (let i = 0; i < oldUser.connections.length; i++) {
this.mergeConnection(oldUser.connections[i]);
}