mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Recalculate pw hash whenever user is modified
This commit is contained in:
parent
5d8198b889
commit
39cd1dbc0f
@ -8,6 +8,7 @@ class User
|
||||
validates_uniqueness_of :name, :email
|
||||
|
||||
before_create :hash_password
|
||||
before_save :hash_password
|
||||
def hash_password
|
||||
require 'digest'
|
||||
self.password = Digest::MD5.hexdigest(self.name + "'s password IS... " + self.password + " (lol!)")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user