Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename Meteor.setPassword to Accounts.setPassword, matching docs.

We meant to do this before releasing 0.5.0 (thus the docs) but mistakenly did
not.

Fixes #454.
  • Loading branch information...
commit bad0726a993376343f79acfa6eac69728bf55f0a 1 parent f58cbc6
@glasser glasser authored
View
2  packages/accounts-password/password_server.js
@@ -354,7 +354,7 @@
});
- Meteor.setPassword = function (userId, newPassword) {
+ Accounts.setPassword = function (userId, newPassword) {
var user = Meteor.users.findOne(userId);
if (!user)
throw new Meteor.Error(403, "User not found");
View
4 packages/accounts-password/password_tests.js
@@ -310,13 +310,13 @@ if (Meteor.isServer) (function () {
test.equal(user.services.password, undefined);
// set a new password.
- Meteor.setPassword(userId, 'new password');
+ Accounts.setPassword(userId, 'new password');
user = Meteor.users.findOne(userId);
var oldVerifier = user.services.password.srp;
test.isTrue(user.services.password.srp);
// reset with the same password, see we get a different verifier
- Meteor.setPassword(userId, 'new password');
+ Accounts.setPassword(userId, 'new password');
user = Meteor.users.findOne(userId);
var newVerifier = user.services.password.srp;
test.notEqual(oldVerifier.salt, newVerifier.salt);
Please sign in to comment.
Something went wrong with that request. Please try again.