phcscriptcdnpro 3.3.5 → 3.4.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfb820fb54b57bb568c8facdc73145d65b028822
|
4
|
+
data.tar.gz: 57c394f2966bf11274ea09bca4b3cd4cfba0b945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71bad8d769d830de2a83bc02164f6e06bfa1f8d39c23ed4881e328c21a31fec6984a6f353ce5a23b9fb19a4ac1991c8d4394540ccb6d0dfee9a28f8be0b1983f
|
7
|
+
data.tar.gz: 63773d5ae3d84df8362dd1f27940c2ff04ed2f7bc5b6d4a8c910372d097145ede99b497c25d111e1080f1e3643c4ec379b1ceb291cece418339379847d53d600
|
@@ -5,6 +5,34 @@ module Phcscriptcdnpro
|
|
5
5
|
before_action :require_user
|
6
6
|
protect_from_forgery with: :exception
|
7
7
|
|
8
|
+
# Grab Member Information
|
9
|
+
def get_member_profile_info
|
10
|
+
@members_profile_info = Member::Profile.find(params[:profile_id])
|
11
|
+
end
|
12
|
+
|
13
|
+
# AuthRocket User Helpers
|
14
|
+
def require_user
|
15
|
+
unless current_user
|
16
|
+
params.permit!
|
17
|
+
session[:last_url] = request.get? ? url_for(params) : url_for
|
18
|
+
redirect_to new_login_url
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def current_user
|
23
|
+
@_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user)
|
24
|
+
end
|
25
|
+
helper_method :current_user
|
26
|
+
|
27
|
+
def new_login_url
|
28
|
+
ENV['AUTHROCKET_LOGIN_URL']
|
29
|
+
end
|
30
|
+
helper_method :new_login_url
|
31
|
+
|
32
|
+
def membership_info
|
33
|
+
AuthRocket::Membership.all(user_id: current_user.id).first
|
34
|
+
end
|
35
|
+
|
8
36
|
# Load Helpers
|
9
37
|
helper Phctitleseo::Engine.helpers
|
10
38
|
helper Phcnotifi::Engine.helpers
|