summaryrefslogtreecommitdiff
path: root/app/models/local_email.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-05-30 18:01:54 +0200
committerazul <azul@leap.se>2014-05-30 18:01:54 +0200
commit568a5c243f0a0ef90807c96b19643ec341994bbb (patch)
tree1b921c5243e51d6aaa413ed71455d51f86f94353 /app/models/local_email.rb
parent1d0d61389011a8d0d169bc139590d90a6fbbac60 (diff)
parentbbe7b3b7deb2b44d34f7c39dda2c3db284e2bf10 (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.rb10
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