devise_password_expirable 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2243f56dcf1b29259ac7b49d2c8a5bc220f5e88834d9bd8e86e461868a6d72882594f2db4e96814e7446b9cf01335b4654183dfc59f276576a5c794dbf660f1e
|
4
|
+
data.tar.gz: 82b9fd866a813b251d7f74329fd86743f4f3c7d442aaf51e7eebb85b73fb9a220402ea0aea6f857f7d58c5e34f9c822375ecd9e771ee6fad746428a04ad3a890
|
5
5
|
SHA1:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bccf0aed784f474be00d376648b432a4d874bab8
|
7
|
+
data.tar.gz: 03cd74b9e271eca84c10701f4eef3543f0a5b81c
|
@@ -10,9 +10,19 @@ module Devise
|
|
10
10
|
result = if valid_password?(current_password) && new_password.present? && new_password_confirmation.present?
|
11
11
|
update_attributes(params)
|
12
12
|
else
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
if current_password.blank?
|
14
|
+
self.errors.add(:current_password, :blank)
|
15
|
+
elsif !valid_password?(current_password)
|
16
|
+
self.errors.add(:current_password, :invalid)
|
17
|
+
end
|
18
|
+
|
19
|
+
if new_password.blank?
|
20
|
+
self.errors.add(:password, :blank)
|
21
|
+
end
|
22
|
+
if new_password_confirmation.blank?
|
23
|
+
self.errors.add(:password_confirmation, :blank)
|
24
|
+
end
|
25
|
+
|
16
26
|
self.attributes = params
|
17
27
|
false
|
18
28
|
end
|