Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
user_revision
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
user_revision
Commits
d0bf0916
Commit
d0bf0916
authored
1 year ago
by
Rick Jones
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3367385
by RickJ: Conflicts with Drush
parent
2d7e3be2
Branches
7.x-2.x
Tags
7.x-2.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
user_revision.install
+38
-0
38 additions, 0 deletions
user_revision.install
with
38 additions
and
0 deletions
user_revision.install
+
38
−
0
View file @
d0bf0916
...
...
@@ -230,6 +230,37 @@ function user_revision_install() {
// Execute Batch API.
batch_set
(
$batch
);
// Add uid-0 record.
_user_revision_add_uid_0
();
}
/**
* Add revision record for uid 0 (anonymous user).
*
* Have to do this separately to avoid problems with
* vid serial column auto-generating values.
*/
function
_user_revision_add_uid_0
()
{
$urzero
=
db_select
(
'user_revision'
,
'ur'
)
->
fields
(
'ur'
,
array
(
'uid'
))
->
condition
(
'ur.uid'
,
0
)
->
execute
()
->
fetchAll
();
if
(
empty
(
$urzero
))
{
db_insert
(
'user_revision'
)
->
fields
(
array
(
'uid'
=>
0
,
'log'
=>
''
,
))
->
execute
();
// vid is auto-increment so change it to 0.
db_update
(
'user_revision'
)
->
fields
(
array
(
'vid'
=>
0
))
->
condition
(
'uid'
,
0
)
->
execute
();
}
}
/**
...
...
@@ -288,3 +319,10 @@ function user_revision_update_7002() {
}
}
}
/**
* Add revision record for uid 0 (anonymous user).
*/
function
user_revision_update_7003
()
{
_user_revision_add_uid_0
();
}
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