85 string references to current_user

AccountSwitcherTest::testAccountSwitching in core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
AllowedValuesConstraintValidator::create in core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php
Instantiates a new instance of this class.
ArgumentDefaultTest::testArgumentDefaultNoOptions in core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
Tests the use of a default argument plugin that provides no options.
BlockContentBlock::create in core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
Creates an instance of the plugin.
BlockManagerTest::setUp in core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php
Broken::create in core/lib/Drupal/Core/Block/Plugin/Block/Broken.php
Creates an instance of the plugin.
CancelUser::create in core/modules/user/src/Plugin/Action/CancelUser.php
Creates an instance of the plugin.
ChooseBlockController::create in core/modules/layout_builder/src/Controller/ChooseBlockController.php
Instantiates a new instance of this class.
CKEditor5ImageController::create in core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
Instantiates a new instance of this class.
CKEditor5MediaController::create in core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php
Instantiates a new instance of this class.
CommentDefaultFormatter::create in core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
Creates an instance of the plugin.
CommentDefaultFormatterCacheTagsTest::setUp in core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
CommentForm::create in core/modules/comment/src/CommentForm.php
Instantiates a new instance of this class.
CommentLockTest::testLocks in core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php
Tests the lock behavior.
CommentStorage::createInstance in core/modules/comment/src/CommentStorage.php
Instantiates a new instance of this entity handler.
CommentViewBuilder::createInstance in core/modules/comment/src/CommentViewBuilder.php
Instantiates a new instance of this entity handler.
ConfigTranslationController::create in core/modules/config_translation/src/Controller/ConfigTranslationController.php
Instantiates a new instance of this class.
ContentTranslationHandler::createInstance in core/modules/content_translation/src/ContentTranslationHandler.php
Instantiates a new instance of this entity handler.
ControllerBase::currentUser in core/lib/Drupal/Core/Controller/ControllerBase.php
Returns the current user.
CopyTest::testEntityStorageException in core/modules/file/tests/src/Kernel/CopyTest.php
Tests for entity storage exception.
DbUpdateController::create in core/modules/system/src/Controller/DbUpdateController.php
Instantiates a new instance of this class.
DefaultSelection::create in core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php
Creates an instance of the plugin.
DeleteAction::create in core/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php
Creates an instance of the plugin.
DeleteMultipleForm::create in core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php
Instantiates a new instance of this class.
Drupal::currentUser in core/lib/Drupal.php
Gets the current active user.
DrupalKernel::initializeContainer in core/lib/Drupal/Core/DrupalKernel.php
Initializes the service container.
DrupalTest::testCurrentUser in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the currentUser() method.
EntityTypeInfo::create in core/modules/content_moderation/src/EntityTypeInfo.php
Instantiates a new instance of this class.
EntryPoint::create in core/modules/jsonapi/src/Controller/EntryPoint.php
Instantiates a new instance of this class.
FileRepositoryTest::testEntityStorageException in core/modules/file/tests/src/Kernel/FileRepositoryTest.php
Tests for entity storage exception.
FileUploadResource::create in core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
Creates an instance of the plugin.
FormBuilder::currentUser in core/lib/Drupal/Core/Form/FormBuilder.php
Gets the current active user.
FormBuilderTest::testFormTokenCacheability in core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
@covers ::prepareForm
ForumController::create in core/modules/forum/src/Controller/ForumController.php
Instantiates a new instance of this class.
HandlerFilterCurrentUserTest::setUp in core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
HelpSearch::create in core/modules/help_topics/src/Plugin/Search/HelpSearch.php
Creates an instance of the plugin.
ImageFormatter::create in core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php
Creates an instance of the plugin.
ImageUrlFormatter::create in core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php
Creates an instance of the plugin.
InlineBlock::create in core/modules/layout_builder/src/Plugin/Block/InlineBlock.php
Creates an instance of the plugin.
LanguageServiceProvider::register in core/modules/language/src/LanguageServiceProvider.php
Registers services to the container.
LayoutBuilderIntegration::create in core/modules/quickedit/src/LayoutBuilderIntegration.php
Instantiates a new instance of this class.
LinkAccessConstraintValidator::create in core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
Instantiates a new instance of this class.
ListingEmpty::create in core/modules/block_content/src/Plugin/views/area/ListingEmpty.php
Creates an instance of the plugin.
LocaleLookupTest::setUp in core/modules/locale/tests/src/Unit/LocaleLookupTest.php
LocaleLookupTest::testGetCid in core/modules/locale/tests/src/Unit/LocaleLookupTest.php
@covers ::getCid
LoggerChannelFactory::get in core/lib/Drupal/Core/Logger/LoggerChannelFactory.php
Retrieves the registered logger for the requested channel.
LoginLogoutMenuLink::create in core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php
Creates an instance of the plugin.
MediaEmbedFilterTestBase::setUp in core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php
MediaLibraryWidget::create in core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php
Creates an instance of the plugin.
MediaThumbnailFormatter::create in core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php
Creates an instance of the plugin.
ModerationStateConstraintValidator::create in core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php
Instantiates a new instance of this class.
ModerationStateWidget::create in core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php
Creates an instance of the plugin.
ModulesListForm::create in core/modules/system/src/Form/ModulesListForm.php
Instantiates a new instance of this class.
MoveTest::testEntityStorageException in core/modules/file/tests/src/Kernel/MoveTest.php
Tests for entity storage exception.
NodeForm::create in core/modules/node/src/NodeForm.php
Instantiates a new instance of this class.
NodeSearch::create in core/modules/node/src/Plugin/Search/NodeSearch.php
Creates an instance of the plugin.
NodeViewController::create in core/modules/node/src/Controller/NodeViewController.php
Instantiates a new instance of this class.
OverridesSectionStorage::create in core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
Creates an instance of the plugin.
ProtectedUserFieldConstraintValidator::create in core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php
Instantiates a new instance of this class.
ResponsiveImageFormatter::create in core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php
Creates an instance of the plugin.
SectionRenderTest::setUp in core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
SharedTempStoreTest::testLegacyConstructor in core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@group legacy
SharedTempStoreTest::testLegacyFactoryConstructor in core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@group legacy @covers \Drupal\Core\TempStore\SharedTempStoreFactory::__construct
SyslogTest::testSyslogWriting in core/modules/syslog/tests/src/Kernel/SyslogTest.php
@covers ::log
SystemBrandingOffCanvasForm::create in core/modules/system/src/Form/SystemBrandingOffCanvasForm.php
Instantiates a new instance of this class.
SystemTestController::create in core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php
Instantiates a new instance of this class.
TaxonomyIndexTid::create in core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
Creates an instance of the plugin.
TaxonomyIndexTid::__construct in core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
Constructs a TaxonomyIndexTid object.
TokenTest::setUp in core/tests/Drupal/Tests/Core/Utility/TokenTest.php
TokenTest::testReplaceWithBubbleableMetadataObject in core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@covers ::replace
TokenTest::testReplaceWithHookTokensAlterWithBubbleableMetadata in core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@covers ::replace @covers ::replace
TokenTest::testReplaceWithHookTokensWithBubbleableMetadata in core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@covers ::replace
UpdateKernel::handleAccess in core/lib/Drupal/Core/Update/UpdateKernel.php
Checks if the current user has rights to access updates page.
UrlTest::testRenderAccess in core/tests/Drupal/Tests/Core/UrlTest.php
Tests the renderAccess() method.
UserAccountFormPasswordResetTest::setUp in core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php
UserMailRequiredValidatorTest::createValidator in core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php
Creates a validator instance.
UserRegistrationResource::create in core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php
Creates an instance of the plugin.
UserSearch::create in core/modules/user/src/Plugin/Search/UserSearch.php
Creates an instance of the plugin.
UserSelection::create in core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php
Creates an instance of the plugin.
UserTrackerTab::create in core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php
Creates an instance of the plugin.
views.view.test_plugin_argument_default_current_user.yml in core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml
core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml
ViewsBlockBase::create in core/modules/views/src/Plugin/Block/ViewsBlockBase.php
Creates an instance of the plugin.
ViewsSelection::create in core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php
Creates an instance of the plugin.
ViewUIObjectTest::testIsLocked in core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
Tests the isLocked method.
VocabularyListBuilder::createInstance in core/modules/taxonomy/src/VocabularyListBuilder.php
Instantiates a new instance of this entity handler.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.