Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
N
node_authlink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
node_authlink
Commits
12179e3b
Commit
12179e3b
authored
Aug 22, 2018
by
akalam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start session for anonymous users
parent
8b28c829
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
node_authlink.module
node_authlink.module
+4
-2
No files found.
node_authlink.module
View file @
12179e3b
...
...
@@ -240,10 +240,12 @@ function node_authlink_node_access(NodeInterface $node, $op, AccountInterface $a
if
(
$node
->
authkey
==
$_GET
[
'authkey'
])
{
// Start session
if
(
!
isset
(
$_SESSION
))
/** @var \Drupal\Core\Session\SessionManager $session_manager */
{
if
(
$account
->
isAnonymous
()
&&
!
isset
(
$_SESSION
[
'node_authlink_nodes'
]))
{
/** @var \Drupal\Core\Session\SessionManager $session_manager */
$session_manager
=
\
Drupal
::
service
(
'session_manager'
);
$session_manager
->
start
();
}
$session_manager
->
start
();
// Save allowed grants to session
$config_grants
=
$config
->
get
(
'grants'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment