|
@@ -16,7 +16,7 @@ class AuthenticationController < ApplicationController
|
16
|
16
|
|
17
|
17
|
flash_message(:success, I18n.t(:greeting, name: u.person.first_name))
|
18
|
18
|
redirect_to root_path
|
19
|
|
- elsif u and not u.confirmed
|
|
19
|
+ elsif u && (not u.confirmed)
|
20
|
20
|
flash_message(:warning, I18n.t('authentication.activation_required'))
|
21
|
21
|
redirect_to action: 'login_form'
|
22
|
22
|
else
|
|
@@ -53,7 +53,7 @@ class AuthenticationController < ApplicationController
|
53
|
53
|
end
|
54
|
54
|
|
55
|
55
|
user = User.find_by(person: person)
|
56
|
|
- if user and user.confirmed
|
|
56
|
+ if user && user.confirmed
|
57
|
57
|
flash_message(:warning, I18n.t('authentication.already_activated'))
|
58
|
58
|
redirect_to action: 'login'
|
59
|
59
|
return
|
|
@@ -161,7 +161,7 @@ class AuthenticationController < ApplicationController
|
161
|
161
|
redirect_to action: 'login'
|
162
|
162
|
return false
|
163
|
163
|
end
|
164
|
|
- if token.expires and token.expires < DateTime.now
|
|
164
|
+ if token.expires && (token.expires < DateTime.now)
|
165
|
165
|
flash_message(:warning, I18n.t('authentication.token_expired'))
|
166
|
166
|
redirect_to action: 'login'
|
167
|
167
|
return false
|