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
bee3e48d
Commit
bee3e48d
authored
10 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2368081
by Gábor Hojtsy | andypost: Fixed Remove outdated @todo in hook_user_install().
parent
00d9f691
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
+6
-0
6 additions, 0 deletions
...s/system/src/Tests/Installer/InstallerTranslationTest.php
core/modules/user/user.install
+0
-5
0 additions, 5 deletions
core/modules/user/user.install
with
6 additions
and
5 deletions
core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
+
6
−
0
View file @
bee3e48d
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\system\Tests\Installer
;
use
Drupal\simpletest\InstallerTestBase
;
use
Drupal\user\Entity\User
;
/**
* Selects German as the installation language and verifies the following page
...
...
@@ -51,6 +52,11 @@ public function testInstaller() {
$this
->
assertUrl
(
'user/1'
);
$this
->
assertResponse
(
200
);
$account
=
User
::
load
(
0
);
$this
->
assertEqual
(
$account
->
language
()
->
getId
(),
'de'
,
'Anonymous user is German.'
);
$account
=
User
::
load
(
1
);
$this
->
assertEqual
(
$account
->
language
()
->
getId
(),
'de'
,
'Administrator user is German.'
);
// Ensure that we can enable basic_auth on a non-english site.
$this
->
drupalPostForm
(
'admin/modules'
,
array
(
'modules[Web services][basic_auth][enable]'
=>
TRUE
),
t
(
'Save configuration'
));
$this
->
assertResponse
(
200
);
...
...
This diff is collapsed.
Click to expand it.
core/modules/user/user.install
+
0
−
5
View file @
bee3e48d
...
...
@@ -65,15 +65,11 @@ function user_schema() {
*/
function
user_install
()
{
$storage
=
\Drupal
::
entityManager
()
->
getStorage
(
'user'
);
// @todo Rely on the default value for langcode in
// https://drupal.org/node/1966436
$langcode
=
\Drupal
::
languageManager
()
->
getDefaultLanguage
()
->
getId
();
// Insert a row for the anonymous user.
$storage
->
create
(
array
(
'uid'
=>
0
,
'status'
=>
0
,
'langcode'
=>
$langcode
,
))
->
save
();
...
...
@@ -85,7 +81,6 @@ function user_install() {
'name'
=>
'placeholder-for-uid-1'
,
'mail'
=>
'placeholder-for-uid-1'
,
'status'
=>
TRUE
,
'langcode'
=>
$langcode
,
))
->
save
();
}
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