appmarket: When updating a user encrypt the password if provided

This commit is contained in:
Daniel Molina committed 2012-09-13 15:39:09 +02:00
1 parent 7351fe86bc
commit 4384333a37
1 file changed
+2
+2
View File
@@ -127,6 +127,8 @@ class User
if !hash['password']
hash['password'] = user['password']
else
hash['password'] = generate_password(hash['password'])
end
validator.validate!(hash, session.schema(:user))