diff options
author | azul <azul@leap.se> | 2014-05-30 18:01:54 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-05-30 18:01:54 +0200 |
commit | 568a5c243f0a0ef90807c96b19643ec341994bbb (patch) | |
tree | 1b921c5243e51d6aaa413ed71455d51f86f94353 /app/models/local_email.rb | |
parent | 1d0d61389011a8d0d169bc139590d90a6fbbac60 (diff) | |
parent | bbe7b3b7deb2b44d34f7c39dda2c3db284e2bf10 (diff) |
Merge pull request #168 from azul/bugfix/fix-login-validations
Fix login validations
Diffstat (limited to 'app/models/local_email.rb')
-rw-r--r-- | app/models/local_email.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/local_email.rb b/app/models/local_email.rb index 2b4c65e..ded7baf 100644 --- a/app/models/local_email.rb +++ b/app/models/local_email.rb @@ -58,11 +58,9 @@ class LocalEmail < Email end def handle_in_passwd? - begin - !!Etc.getpwnam(handle) - rescue ArgumentError - # handle was not found - return false - end + Etc.getpwnam(handle).present? + rescue ArgumentError + # handle was not found + return false end end |