user_mgmt 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module UserMgmt
|
|
15
15
|
|
16
16
|
response = log_in *params[:user].values
|
17
17
|
|
18
|
-
if response[:status] == 200
|
18
|
+
if response[:status] == "200"
|
19
19
|
flash[:success] = "User logged in!"
|
20
20
|
cookies.permanent[:user_session_id] = response[:body]["session"]
|
21
21
|
redirect_to main_app.root_path
|
@@ -46,7 +46,7 @@ module UserMgmt
|
|
46
46
|
# if user logged in succesfully, just redirect to main page,
|
47
47
|
# otherwise it means the user doesn't exist yet, so continue
|
48
48
|
# normaly (user will be asked for his email).
|
49
|
-
if response[:status] == 200
|
49
|
+
if response[:status] == "200"
|
50
50
|
cookies.permanent[:user_session_id] = response[:body]["session"]
|
51
51
|
redirect_to main_app.root_path, flash: { success: "User logged in!" }
|
52
52
|
end
|
@@ -59,7 +59,7 @@ module UserMgmt
|
|
59
59
|
response = sign_up_oauth params["uid"], params["provider"].to_sym, params["user"]["Email"]
|
60
60
|
|
61
61
|
#if for some reason, the user couldn't be created
|
62
|
-
if response[:status] == 400
|
62
|
+
if response[:status] == "400"
|
63
63
|
redirect_to sign_up_path, flash: { warning: response[:body] }
|
64
64
|
else
|
65
65
|
response = log_in_oauth params["uid"], params["provider"].to_sym
|
data/lib/user_mgmt/version.rb
CHANGED