Fix typo and code standards

pull/7098/head
Luis Fernando do Nascimento 9 years ago
parent 073dd0be11
commit 42201cf2c6
  1. 2
      packages/rocketchat-i18n/i18n/en.i18n.json
  2. 8
      server/lib/accounts.js

@ -42,7 +42,7 @@
"Accounts_Enrollment_Email_Default": "<h2>Welcome to <h1>[Site_Name]</h1></h2><p>Go to [Site_URL] and try the best open source chat solution available today!</p>",
"Accounts_Enrollment_Email_Description": "You may use the following placeholders: <br /><ul><li>[name], [fname], [lname] for the user's full name, first name or last name, respectively.</li><li>[email] for the user's email.</li><li>[Site_Name] and [Site_URL] for the Application Name and URL respectively.</li></ul>",
"Accounts_Enrollment_Email_Subject_Default": "Welcome to [Site_Name]",
"Accounts_Admin_Email_Approval_Needed_Default": "<p>A user with email <b>[email]</b> has been registered. <br>Please check Administration -> Users to activate or delete it.",
"Accounts_Admin_Email_Approval_Needed_Default": "<p>An user with email <b>[email]</b> has been registered. <br>Please check Administration -> Users to activate or delete it.",
"Accounts_Admin_Email_Approval_Needed_Subject_Default": "A new user registered and needs approval",
"Accounts_ForgetUserSessionOnWindowClose": "Forget user session on window close",
"Accounts_Iframe_api_method": "Api Method",

@ -59,10 +59,8 @@ Accounts.emailTemplates.enrollAccount.html = function(user = {}/*, url*/) {
};
Accounts.emailTemplates.notifyAdmin.subject = function() {
let subject, siteName;
subject = TAPi18n.__('Accounts_Admin_Email_Approval_Needed_Subject_Default');
siteName = RocketChat.settings.get('Site_Name');
const subject = TAPi18n.__('Accounts_Admin_Email_Approval_Needed_Subject_Default');
const siteName = RocketChat.settings.get('Site_Name');
return `[${ siteName }] ${ subject }`;
};
@ -120,7 +118,7 @@ Accounts.onCreateUser(function(options, user = {}) {
if (!user.active) {
user.emails.some((email) => {
RocketChat.models.Roles.findUsersInRole('admin').forEach(function (adminUser) {
RocketChat.models.Roles.findUsersInRole('admin').forEach(function(adminUser) {
email = {
to: adminUser.emails[0].address,
from: RocketChat.settings.get('From_Email'),

Loading…
Cancel
Save