The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/packages/rocketchat-api/server/default/helpers/getLoggedInUser.js

9 lines
287 B

RocketChat.API.default.helperMethods.set('getLoggedInUser', function _getLoggedInUser() {
let user;
if (this.request.headers['x-user-id'] && this.request.headers['x-auth-token']) {
user = RocketChat.models.Users.findOneById(this.request.headers['x-user-id']);
}
return user;
});