mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-23 07:01:12 +01:00
use array.find
This commit is contained in:
@@ -118,11 +118,8 @@ profileController.get = function(req, res, callback) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
userData.groups.forEach(function(group) {
|
||||
if (group && group.name === userData.groupTitle) {
|
||||
userData.selectedGroup = group;
|
||||
}
|
||||
userData.selectedGroup = userData.groups.find(function(group) {
|
||||
return group && group.name === userData.groupTitle;
|
||||
});
|
||||
|
||||
plugins.fireHook('filter:user.account', {userData: userData, uid: req.uid}, next);
|
||||
|
||||
Reference in New Issue
Block a user