@@ -74,6 +74,7 class User < Principal | |||
|
74 | 74 | validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true |
|
75 | 75 | |
|
76 | 76 | before_create :set_mail_notification |
|
77 | before_save :update_hashed_password | |
|
77 | 78 | before_destroy :remove_references_before_destroy |
|
78 | 79 | |
|
79 | 80 | named_scope :in_group, lambda {|group| |
@@ -90,7 +91,7 class User < Principal | |||
|
90 | 91 | true |
|
91 | 92 | end |
|
92 | 93 | |
|
93 | def before_save | |
|
94 | def update_hashed_password | |
|
94 | 95 | # update hashed_password if password was set |
|
95 | 96 | if self.password && self.auth_source_id.blank? |
|
96 | 97 | salt_password(password) |
General Comments 0
You need to be logged in to leave comments.
Login now