Little code layout improvement.
This commit is contained in:
parent
a95185fcb8
commit
8c2ea52b3c
1 changed files with 2 additions and 1 deletions
|
@ -525,7 +525,8 @@ returns
|
|||
end
|
||||
|
||||
# crypt password if not already crypted
|
||||
return if !( self.password && self.password !~ /^\{sha2\}/ )
|
||||
return if !self.password
|
||||
return if self.password =~ /^\{sha2\}/
|
||||
|
||||
crypted = Digest::SHA2.hexdigest( self.password )
|
||||
self.password = "{sha2}#{crypted}"
|
||||
|
|
Loading…
Reference in a new issue