mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
FIX User#send_new_password
* add to_i to password length as nil.to_i == 0 but nil > 0 throws error
This commit is contained in:
parent
6f05d47a8d
commit
8d16792bd5
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
# This serves multiple functions
|
||||
def send_new_password
|
||||
generate_password unless self.raw_password&.length > 0
|
||||
generate_password unless self.raw_password&.length.to_i > 0
|
||||
self.save!
|
||||
|
||||
# TODO: consider moving these two to callbacks
|
||||
|
|
Loading…
Reference in a new issue