Permalink
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...
glasser committed Nov 5, 2012
1 parent f58cbc6 commit bad0726a993376343f79acfa6eac69728bf55f0a
Showing with 3 additions and 3 deletions.
  1. +1 −1 packages/accounts-password/password_server.js
  2. +2 −2 packages/accounts-password/password_tests.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");
@@ -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);

0 comments on commit bad0726

Please sign in to comment.