171 calls to Drupal::currentUser() in Drupal 10
- AccessTest::testCheckFieldAccess in core/
modules/ file/ tests/ src/ Kernel/ AccessTest.php - Tests file entity field access.
- AccessTest::testCreateAccess in core/
modules/ file/ tests/ src/ Kernel/ AccessTest.php - Tests create access checks.
- AccessTest::testOnlyOwnerCanDeleteUpdateFile in core/
modules/ file/ tests/ src/ Kernel/ AccessTest.php - Tests that only the file owner can delete or update a file.
- AssertPageCacheContextsAndTagsTrait::assertCacheTags in core/
modules/ system/ tests/ src/ Functional/ Cache/ AssertPageCacheContextsAndTagsTrait.php - Ensures that some cache tags are present in the current response.
- authorize_access_allowed in core/
authorize.php - Determines if the current user is allowed to run authorize.php.
- BlockContentEntityReferenceSelectionTest::setUp in core/
modules/ block_content/ tests/ src/ Kernel/ BlockContentEntityReferenceSelectionTest.php - BlockUiTest::testContextAwareBlocks in core/
modules/ block/ tests/ src/ Functional/ BlockUiTest.php - Tests the behavior of context-aware blocks.
- BookAdminEditForm::bookAdminTableTree in core/
modules/ book/ src/ Form/ BookAdminEditForm.php - Helps build the main table in the book administration page form.
- BookMultilingualTest::setCurrentLanguage in core/
modules/ book/ tests/ src/ Kernel/ BookMultilingualTest.php - Sets the current language.
- BookMultilingualTest::setUp in core/
modules/ book/ tests/ src/ Kernel/ BookMultilingualTest.php - book_form_node_form_alter in core/
modules/ book/ book.module - Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
- book_node_builder in core/
modules/ book/ book.module - Entity form builder to add the book information to the node.
- book_node_links_alter in core/
modules/ book/ book.module - Implements hook_node_links_alter().
- book_node_prepare_form in core/
modules/ book/ book.module - Implements hook_ENTITY_TYPE_prepare_form() for node entities.
- Comment::getDefaultStatus in core/
modules/ comment/ src/ Entity/ Comment.php - Default value callback for 'status' base field definition.
- CommentFieldItemList::access in core/
modules/ comment/ src/ CommentFieldItemList.php - Checks data value access.
- comment_node_search_result in core/
modules/ comment/ comment.module - Implements hook_node_search_result().
- ConfigurableLanguageManagerTest::testUserProfileTranslationWithPreferredAdminLanguage in core/
modules/ language/ tests/ src/ Functional/ ConfigurableLanguageManagerTest.php - Tests translation of the user profile edit form.
- config_file_download in core/
modules/ config/ config.module - Implements hook_file_download().
- config_translation_entity_operation in core/
modules/ config_translation/ config_translation.module - Implements hook_entity_operation().
- contact_form_user_form_alter in core/
modules/ contact/ contact.module - Implements hook_form_FORM_ID_alter().
- ContentTranslationHandler::getDefaultOwnerId in core/
modules/ content_translation/ src/ ContentTranslationHandler.php - Default value callback for the owner base field definition.
- ContentTranslationSyncImageTest::testImageFieldSync in core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationSyncImageTest.php - Tests image field synchronization.
- content_moderation_views_query_substitutions in core/
modules/ content_moderation/ content_moderation.views_execution.inc - Implements hook_views_query_substitutions().
- content_translation_form_field_config_edit_form_alter in core/
modules/ content_translation/ content_translation.module - Implements hook_form_FORM_ID_alter() for 'field_config_edit_form'.
- content_translation_language_configuration_element_process in core/
modules/ content_translation/ content_translation.module - Process callback: Expands the language_configuration form element.
- content_translation_translate_access in core/
modules/ content_translation/ content_translation.module - Access callback for the translation overview page.
- contextual_page_attachments in core/
modules/ contextual/ contextual.module - Implements hook_page_attachments().
- contextual_preprocess in core/
modules/ contextual/ contextual.module - Implements hook_preprocess().
- contextual_toolbar in core/
modules/ contextual/ contextual.module - Implements hook_toolbar().
- CurrentUser::getArgument in core/
modules/ user/ src/ Plugin/ views/ argument_default/ CurrentUser.php - DisplayPageTest::testPageResponses in core/
modules/ views/ tests/ src/ Kernel/ Plugin/ DisplayPageTest.php - Checks the behavior of the page for access denied/not found behaviors.
- DrupalTest::testCurrentUser in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the currentUser() method.
- DynamicPageCacheTestController::htmlUncacheableContexts in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - A route returning a render array (with 'user' context, so uncacheable)
- Editor::getAttachments in core/
modules/ quickedit/ src/ Plugin/ InPlaceEditor/ Editor.php - editor_file_download in core/
modules/ editor/ editor.module - Implements hook_file_download().
- EntityAccessControlHandler::prepareUser in core/
lib/ Drupal/ Core/ Entity/ EntityAccessControlHandler.php - Loads the current account object, if it does not exist yet.
- EntityAccessControlHandlerTest::testDefaultEntityAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Ensures default entity access is checked when necessary.
- EntityAccessControlHandlerTest::testEntityAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Ensures entity access is properly working.
- EntityAccessControlHandlerTest::testEntityAccessDefaultController in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Ensures that the default handler is used as a fallback.
- EntityAccessControlHandlerTest::testEntityTranslationAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Ensures entity access for entity translations is properly working.
- EntityAccessControlHandlerTest::testFieldAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Tests the default access handling for the ID and UUID fields.
- EntityAccessControlHandlerTest::testUserLabelAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Ensures user labels are accessible for everyone.
- EntityAutocomplete::processEntityAutocomplete in core/
lib/ Drupal/ Core/ Entity/ Element/ EntityAutocomplete.php - Adds entity autocomplete functionality to a form element.
- EntityAutocompleteElementFormTest::testEntityAutocompleteAccess in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ Element/ EntityAutocompleteElementFormTest.php - Tests that access is properly checked by the EntityAutocomplete element.
- EntityKernelTestBaseTest::testSetUpCurrentUser in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityKernelTestBaseTest.php - Tests that the current user is set up correctly.
- EntityOwnerTrait::getDefaultEntityOwner in core/
modules/ user/ src/ EntityOwnerTrait.php - Default value callback for 'owner' base field.
- EntityReferenceAutocompleteWidget::formElement in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ EntityReferenceAutocompleteWidget.php - Returns the form for a single field widget.
- EntityReferenceSelectionSortTest::setUp in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityReferenceSelection/ EntityReferenceSelectionSortTest.php - EntityTranslationTest::doTestEntityLanguageMethods in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityTranslationTest.php - Executes the entity language method tests for the given entity type.
- entity_test_query_entity_test_access_alter in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_query_entity_test_access_alter().
- FieldEntityLinkTest::doTestEntityLink in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldEntityLinkTest.php - Tests whether entity links behave as expected.
- FieldEntityLinkTest::testEntityLink in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldEntityLinkTest.php - Tests entity link fields.
- FieldRenderedEntityTest::testRenderedEntityWithField in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldRenderedEntityTest.php - Tests the rendered entity output with the test field configured to show.
- FieldRenderedEntityTest::testRenderedEntityWithoutField in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FieldRenderedEntityTest.php - Tests the default rendered entity output.
- field_ui_entity_operation in core/
modules/ field_ui/ field_ui.module - Implements hook_entity_operation().
- FileManagedUnitTestBase::setUp in core/
modules/ file/ tests/ src/ Kernel/ FileManagedUnitTestBase.php - file_file_download in core/
modules/ file/ file.module - Implements hook_file_download().
- file_validate_size in core/
modules/ file/ file.module - Checks that the file's size is below certain limits.
- FilterAPITest::testTypedDataAPI in core/
modules/ filter/ tests/ src/ Kernel/ FilterAPITest.php - Tests the function of the typed data type.
- FilterPluginBase::storeExposedInput in core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php - filter_default_format in core/
modules/ filter/ filter.module - Returns the ID of the default text format for a particular user.
- FormBase::currentUser in core/
lib/ Drupal/ Core/ Form/ FormBase.php - Gets the current user.
- FormBuilder::currentUser in core/
lib/ Drupal/ Core/ Form/ FormBuilder.php - Gets the current active user.
- FormCacheTest::testCacheToken in core/
tests/ Drupal/ KernelTests/ Core/ Form/ FormCacheTest.php - Tests the form cache with a logged-in user.
- FormElement::processAutocomplete in core/
lib/ Drupal/ Core/ Render/ Element/ FormElement.php - Adds autocomplete functionality to elements.
- FormTestVerticalTabsForm::buildForm in core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestVerticalTabsForm.php - Form constructor.
- FunctionsTest::testIndexedKeyedLinks in core/
modules/ system/ tests/ src/ Kernel/ Theme/ FunctionsTest.php - Tests links.html.twig using links with indexed keys.
- FunctionsTest::testLinks in core/
modules/ system/ tests/ src/ Kernel/ Theme/ FunctionsTest.php - Tests links.html.twig.
- HistoryTimestampTest::testHandlers in core/
modules/ history/ tests/ src/ Kernel/ Views/ HistoryTimestampTest.php - Tests the handlers.
- HistoryUserTimestamp::init in core/
modules/ history/ src/ Plugin/ views/ field/ HistoryUserTimestamp.php - HistoryUserTimestamp::query in core/
modules/ history/ src/ Plugin/ views/ filter/ HistoryUserTimestamp.php - Add this filter to the query.
- HistoryUserTimestamp::query in core/
modules/ history/ src/ Plugin/ views/ field/ HistoryUserTimestamp.php - HistoryUserTimestamp::render in core/
modules/ history/ src/ Plugin/ views/ field/ HistoryUserTimestamp.php - history_node_view_alter in core/
modules/ history/ history.module - Implements hook_ENTITY_TYPE_view_alter() for node entities.
- history_read_multiple in core/
modules/ history/ history.module - Retrieves the last viewed timestamp for each of the passed node IDs.
- history_write in core/
modules/ history/ history.module - Updates 'last viewed' timestamp of the specified entity for the current user.
- hook_file_url_alter in core/
lib/ Drupal/ Core/ File/ file.api.php - Alter the URL to a file.
- hook_js_settings_alter in core/
lib/ Drupal/ Core/ Render/ theme.api.php - Perform necessary alterations to the JavaScript settings (drupalSettings).
- hook_page_attachments in core/
lib/ Drupal/ Core/ Render/ theme.api.php - Add attachments (typically assets) to a page before it is rendered.
- hook_preprocess in core/
lib/ Drupal/ Core/ Render/ theme.api.php - Preprocess theme variables for templates.
- hook_template_preprocess_default_variables_alter in core/
lib/ Drupal/ Core/ Render/ theme.api.php - Alter the default, hook-independent variables for all templates.
- hook_user_cancel_methods_alter in core/
modules/ user/ user.api.php - Modify account cancellation methods.
- hook_views_pre_execute in core/
modules/ views/ views.api.php - Act on the view after the query is built and just before it is executed.
- hook_views_pre_view in core/
modules/ views/ views.api.php - Alter a view at the very beginning of Views processing.
- ImageItem::generateSampleValue in core/
modules/ image/ src/ Plugin/ Field/ FieldType/ ImageItem.php - Generates placeholder field values.
- language_get_default_langcode in core/
modules/ language/ language.module - Returns the default language code assigned to an entity type and a bundle.
- LayoutBuilderCompatibilityTestBase::setUp in core/
modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderCompatibilityTestBase.php - layout_builder_help in core/
modules/ layout_builder/ layout_builder.module - Implements hook_help().
- LinkBase::currentUser in core/
modules/ views/ src/ Plugin/ views/ field/ LinkBase.php - Gets the current active user.
- LinkWidget::formElement in core/
modules/ link/ src/ Plugin/ Field/ FieldWidget/ LinkWidget.php - Returns the form for a single field widget.
- ListingEmpty::render in core/
modules/ node/ src/ Plugin/ views/ area/ ListingEmpty.php - Render the area.
- LocaleLookup::getCid in core/
modules/ locale/ src/ LocaleLookup.php - Gets the cache ID.
- locale_translate_batch_finished in core/
modules/ locale/ locale.bulk.inc - Implements callback_batch_finished().
- locale_translation_batch_status_finished in core/
modules/ locale/ locale.batch.inc - Implements callback_batch_finished().
- ManagedFile::processManagedFile in core/
modules/ file/ src/ Element/ ManagedFile.php - Render API callback: Expands the managed_file element type.
- ManagedFile::valueCallback in core/
modules/ file/ src/ Element/ ManagedFile.php - Determines how user input is mapped to an element's #value property.
- MediaFilterController::preview in core/
modules/ media/ src/ Controller/ MediaFilterController.php - Returns a HTML response containing a preview of the text after filtering.
- media_library_help in core/
modules/ media_library/ media_library.module - Implements hook_help().
- media_requirements in core/
modules/ media/ media.install - Implements hook_requirements().
- media_views_query_substitutions in core/
modules/ media/ media.module - Implements hook_views_query_substitutions().
- menu_ui_form_node_form_alter in core/
modules/ menu_ui/ menu_ui.module - Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
- menu_ui_help in core/
modules/ menu_ui/ menu_ui.module - Implements hook_help().
- NodeAccessTest::testGetDefaultRevisionId in core/
modules/ content_moderation/ tests/ src/ Kernel/ NodeAccessTest.php - @covers \Drupal\content_moderation\ModerationInformation::getDefaultRevisionId
- NodeCreationTrait::createNode in core/
modules/ node/ tests/ src/ Traits/ NodeCreationTrait.php - Creates a node based on default settings.
- NodeNewComments::preRender in core/
modules/ comment/ src/ Plugin/ views/ field/ NodeNewComments.php - node_access_view_all_nodes in core/
modules/ node/ node.module - Determines whether the user has a global viewing grant for all nodes.
- node_get_recent in core/
modules/ node/ node.module - Finds the most recently changed nodes that are available to the current user.
- node_help in core/
modules/ node/ node.module - Implements hook_help().
- node_mark in core/
modules/ node/ node.module - Determines the type of marker to be displayed for a given node.
- node_query_node_access_alter in core/
modules/ node/ node.module - Implements hook_query_TAG_alter().
- node_views_query_substitutions in core/
modules/ node/ node.views_execution.inc - Implements hook_views_query_substitutions().
- olivero_preprocess_field__comment in core/
themes/ olivero/ olivero.theme - Implements hook_preprocess_HOOK() for field--comment.html.twig.
- OptionsWidgetBase::getOptions in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ OptionsWidgetBase.php - Returns the array of options for the widget.
- QuickEditController::entitySave in core/
modules/ quickedit/ src/ QuickEditController.php - Saves an entity into the database, from PrivateTempStore.
- quickedit_entity_view_alter in core/
modules/ quickedit/ quickedit.module - Implements hook_entity_view_alter().
- quickedit_page_attachments in core/
modules/ quickedit/ quickedit.module - Implements hook_page_attachments().
- quickedit_preprocess_entity_page_title in core/
modules/ quickedit/ quickedit.module - Implements hook_preprocess_entity_page_title().
- quickedit_preprocess_field in core/
modules/ quickedit/ quickedit.module - Implements hook_preprocess_HOOK() for field templates.
- quickedit_preprocess_page_title in core/
modules/ quickedit/ quickedit.module - Implements hook_preprocess_HOOK() for the page title template.
- rdf_preprocess_node in core/
modules/ rdf/ rdf.module - Implements hook_preprocess_HOOK() for node templates.
- settings_tray_toolbar_alter in core/
modules/ settings_tray/ settings_tray.module - Implements hook_toolbar_alter().
- shortcut_current_displayed_set in core/
modules/ shortcut/ shortcut.module - Returns the current displayed shortcut set for the provided user account.
- shortcut_default_set in core/
modules/ shortcut/ shortcut.module - Returns the default shortcut set for a given user account.
- shortcut_help in core/
modules/ shortcut/ shortcut.module - Implements hook_help().
- shortcut_set_edit_access in core/
modules/ shortcut/ shortcut.module - Access callback for editing a shortcut set.
- shortcut_set_switch_access in core/
modules/ shortcut/ shortcut.module - Access callback for switching the shortcut set assigned to a user account.
- shortcut_toolbar in core/
modules/ shortcut/ shortcut.module - Implements hook_toolbar().
- statistics_node_links_alter in core/
modules/ statistics/ statistics.module - Implements hook_node_links_alter().
- system_get_module_admin_tasks in core/
modules/ system/ system.module - Generate a list of tasks offered by a specified module.
- system_help in core/
modules/ system/ system.module - Implements hook_help().
- system_page_attachments in core/
modules/ system/ system.module - Implements hook_page_attachments().
- system_page_top in core/
modules/ system/ system.module - Implements hook_page_top().
- template_preprocess_forum_list in core/
modules/ forum/ forum.module - Prepares variables for forum list templates.
- template_preprocess_system_security_advisories_fetch_error_message in core/
modules/ system/ system.theme.inc - Prepares variables for security advisories fetch error message templates.
- template_preprocess_update_fetch_error_message in core/
modules/ update/ update.report.inc - Prepares variables for update fetch error message templates.
- template_preprocess_username in core/
modules/ user/ user.module - Prepares variables for username templates.
- TemporaryQueryGuard::getAccessCondition in core/
modules/ jsonapi/ src/ Access/ TemporaryQueryGuard.php - Gets an EntityConditionGroup that filters out inaccessible entities.
- TextFormat::currentUser in core/
modules/ filter/ src/ Element/ TextFormat.php - Wraps the current user.
- TimezoneTest::setUp in core/
tests/ Drupal/ KernelTests/ Core/ Datetime/ Element/ TimezoneTest.php - toolbar_page_top in core/
modules/ toolbar/ toolbar.module - Implements hook_page_top().
- toolbar_preprocess_html in core/
modules/ toolbar/ toolbar.module - Implements hook_preprocess_HOOK() for HTML document templates.
- tour_page_bottom in core/
modules/ tour/ tour.module - Implements hook_page_bottom().
- tour_toolbar in core/
modules/ tour/ tour.module - Implements hook_toolbar().
- UiHelperTrait::drupalLogout in core/
tests/ Drupal/ Tests/ UiHelperTrait.php - Logs a user out of the Mink controlled browser and confirms.
- update_authorize_update_batch_finished in core/
modules/ update/ update.authorize.inc - Batch callback: Performs actions when the authorized update batch is done.
- update_page_top in core/
modules/ update/ update.module - Implements hook_page_top().
- User::postSave in core/
modules/ user/ src/ Entity/ User.php - UserCreationTrait::setCurrentUser in core/
modules/ user/ tests/ src/ Traits/ UserCreationTrait.php - Switch the current logged in user.
- UserMailRequiredValidator::validate in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserMailRequiredValidator.php - UserTokenReplaceTest::testUserTokenReplacement in core/
modules/ user/ tests/ src/ Functional/ UserTokenReplaceTest.php - Creates a user, then tests the tokens generated from it.
- user_cancel in core/
modules/ user/ user.module - Cancel a user account.
- user_cancel_methods in core/
modules/ user/ user.module - Helper function to return available account cancellation methods.
- user_form_process_password_confirm in core/
modules/ user/ user.module - Form element process handler for client-side password validation.
- user_form_test_form_user_cancel_form_alter in core/
modules/ user/ tests/ modules/ user_form_test/ user_form_test.module - Implements hook_form_FORM_ID_alter() for user_cancel_form().
- user_js_settings_alter in core/
modules/ user/ user.module - Implements hook_js_settings_alter().
- user_login_finalize in core/
modules/ user/ user.module - Finalizes the login process and logs in a user.
- user_logout in core/
modules/ user/ user.module - Logs the current user out.
- user_template_preprocess_default_variables_alter in core/
modules/ user/ user.module - Implements hook_template_preprocess_default_variables_alter().
- user_tokens in core/
modules/ user/ user.tokens.inc - Implements hook_tokens().
- user_toolbar in core/
modules/ user/ user.module - Implements hook_toolbar().
- user_views_query_substitutions in core/
modules/ user/ user.views_execution.inc - Implements hook_views_query_substitutions().
- ViewUI::isLocked in core/
modules/ views_ui/ src/ ViewUI.php - Returns whether the current view is locked.
- WhosOnlineBlockTest::testWhosOnlineBlock in core/
modules/ user/ tests/ src/ Kernel/ WhosOnlineBlockTest.php - Tests the Who's Online block.
- WorkspaceSwitcherTest::testQueryParameterNegotiator in core/
modules/ workspaces/ tests/ src/ Functional/ WorkspaceSwitcherTest.php - Tests switching workspace via a query parameter.
- workspaces_toolbar in core/
modules/ workspaces/ workspaces.module - Implements hook_toolbar().
- _content_translation_form_language_content_settings_form_alter in core/
modules/ content_translation/ content_translation.admin.inc - (proxied) Implements hook_form_FORM_ID_alter().
- _content_translation_preprocess_language_content_settings_table in core/
modules/ content_translation/ content_translation.admin.inc - (proxied) Implements hook_preprocess_HOOK().
- _filter_tips in core/
modules/ filter/ filter.module - Retrieves the filter tips.
- _update_manager_access in core/
modules/ update/ update.module - Resolves if the current user can access updater menu items.
- _user_cancel in core/
modules/ user/ user.module - Implements callback_batch_operation().