Commit 1504e0b4ccd1a859ca7c3ec8ec89c8c8d425e7ae
1 parent
79beaf7f
Exists in
master
and in
29 other branches
ActionItem9: minor doc work
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@159 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
app/models/user.rb
... | ... | @@ -65,6 +65,10 @@ class User < ActiveRecord::Base |
65 | 65 | class IncorrectPassword < Exception; end |
66 | 66 | |
67 | 67 | # Changes the password of a user. |
68 | + # | |
69 | + # * Raises IncorrectPassword if <tt>current</tt> is different from the user's | |
70 | + # current password. | |
71 | + # * Saves the record unless it is a new one. | |
68 | 72 | def change_password!(current, new, confirmation) |
69 | 73 | raise IncorrectPassword unless self.authenticated?(current) |
70 | 74 | self.password = new | ... | ... |