Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
49481f68
Commit
49481f68
authored
18 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#79166
by hunmonk: fixed session breakage.
parent
5b825a7b
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/bootstrap.inc
+2
-1
2 additions, 1 deletion
includes/bootstrap.inc
includes/session.inc
+1
-1
1 addition, 1 deletion
includes/session.inc
with
3 additions
and
2 deletions
includes/bootstrap.inc
+
2
−
1
View file @
49481f68
...
@@ -615,12 +615,13 @@ function drupal_is_denied($type, $mask) {
...
@@ -615,12 +615,13 @@ function drupal_is_denied($type, $mask) {
*
*
* @return Object - the user object.
* @return Object - the user object.
*/
*/
function
drupal_anonymous_user
()
{
function
drupal_anonymous_user
(
$session
=
''
)
{
$user
=
new
stdClass
();
$user
=
new
stdClass
();
$user
->
uid
=
0
;
$user
->
uid
=
0
;
$user
->
hostname
=
$_SERVER
[
'REMOTE_ADDR'
];
$user
->
hostname
=
$_SERVER
[
'REMOTE_ADDR'
];
$user
->
roles
=
array
();
$user
->
roles
=
array
();
$user
->
roles
[
DRUPAL_ANONYMOUS_RID
]
=
'anonymous user'
;
$user
->
roles
[
DRUPAL_ANONYMOUS_RID
]
=
'anonymous user'
;
$user
->
session
=
$session
;
return
$user
;
return
$user
;
}
}
...
...
This diff is collapsed.
Click to expand it.
includes/session.inc
+
1
−
1
View file @
49481f68
...
@@ -41,7 +41,7 @@ function sess_read($key) {
...
@@ -41,7 +41,7 @@ function sess_read($key) {
}
}
// We didn't find the client's record (session has expired), or they are an anonymous user.
// We didn't find the client's record (session has expired), or they are an anonymous user.
else
{
else
{
$user
=
drupal_anonymous_user
();
$user
=
drupal_anonymous_user
(
$user
->
session
);
}
}
return
$user
->
session
;
return
$user
->
session
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment