Skip to content

Commit 19ca589

Browse files
committed
fix reset password - closes #1502
1 parent decaf13 commit 19ca589

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed
+14-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
Meteor.startup ->
2-
Accounts.onEmailVerificationLink (token, done) ->
3-
Accounts.verifyEmail token, (error) ->
4-
if not error?
5-
alert(t('Email_verified'))
1+
Accounts.onEmailVerificationLink (token, done) ->
2+
Accounts.verifyEmail token, (error) ->
3+
if not error?
4+
alert(t('Email_verified'))
65

7-
done()
6+
done()
87

9-
Accounts.onResetPasswordLink (token, done) ->
10-
newPassword = prompt(t('New_password'))
11-
Accounts.resetPassword token, newPassword, (error) ->
12-
if error?
13-
console.log error
14-
alert(t('Error_changing_password'))
15-
else
16-
alert('Password_changed')
17-
done()
8+
Accounts.onResetPasswordLink (token, done) ->
9+
newPassword = prompt(t('New_password'))
10+
Accounts.resetPassword token, newPassword, (error) ->
11+
if error?
12+
console.log error
13+
alert(t('Error_changing_password'))
14+
else
15+
alert('Password_changed')
16+
done()

packages/rocketchat-ui/package.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Package.onUse(function(api) {
1414
api.versionsFrom('1.2.1');
1515

1616
api.use([
17+
'accounts-base',
1718
'mongo',
1819
'session',
1920
'jquery',

server/lib/accounts.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Accounts.emailTemplates.verifyEmail.text = (user, url) ->
2525
resetPasswordText = Accounts.emailTemplates.resetPassword.text
2626
Accounts.emailTemplates.resetPassword.text = (user, url) ->
2727
url = url.replace Meteor.absoluteUrl(), Meteor.absoluteUrl() + 'login/'
28-
verifyEmailText user, url
28+
resetPasswordText user, url
2929

3030
if RocketChat.settings.get 'Accounts_Enrollment_Email'
3131
Accounts.emailTemplates.enrollAccount.text = (user, url) ->

0 commit comments

Comments
 (0)