Skip to content

Node.js based forum software built for the modern web

removed find

barisusaklif996dfab9130
diff --git a/src/controllers/accounts/profile.js b/src/controllers/accounts/profile.js
index 2f257def2c..de10c69b6a 100644
--- a/src/controllers/accounts/profile.js
+++ b/src/controllers/accounts/profile.js
@@ -119,8 +119,10 @@ profileController.get = function(req, res, callback) {
);
}
- userData.selectedGroup = userData.groups.find(function(group) {
- return group && group.name === userData.groupTitle;
+ userData.groups.forEach(function(group) {
+ if (group && group.name === userData.groupTitle) {
+ userData.selectedGroup = group;
+ }
});
plugins.fireHook('filter:user.account', {userData: userData, uid: req.uid}, next);