Little code layout improvement.

This commit is contained in:
Martin Edenhofer 2015-04-30 18:02:44 +02:00
parent a95185fcb8
commit 8c2ea52b3c

View file

@ -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}"