diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index a322b09..79059af 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -46,7 +46,7 @@ * The entity manager. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. - * @param \Drupal\Core\Entity\Query\QueryFactory + * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query * The entity query factory. */ public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, QueryFactory $entity_query) { diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php index b5ce805..95f0ff4 100644 --- a/core/modules/user/src/Controller/UserController.php +++ b/core/modules/user/src/Controller/UserController.php @@ -164,6 +164,8 @@ public function logout() { } /** + * Menu callback; Cancel a user account via email confirmation link. + * * @todo Remove user_cancel_confirm(). */ public function confirmCancel(UserInterface $user, $timestamp = 0, $hashed_pass = '') { diff --git a/core/modules/user/src/Plugin/views/field/Link.php b/core/modules/user/src/Plugin/views/field/Link.php index b62d80e..a83d600 100644 --- a/core/modules/user/src/Plugin/views/field/Link.php +++ b/core/modules/user/src/Plugin/views/field/Link.php @@ -80,6 +80,7 @@ public function render(ResultRow $values) { * Alters the field to render a link. * * @param \Drupal\Core\Entity\EntityInterface $entity + * The entity to render. * @param \Drupal\views\ResultRow $values * The current row of the views result. * diff --git a/core/modules/user/src/Plugin/views/wizard/Users.php b/core/modules/user/src/Plugin/views/wizard/Users.php index 1052476..e1681c9 100644 --- a/core/modules/user/src/Plugin/views/wizard/Users.php +++ b/core/modules/user/src/Plugin/views/wizard/Users.php @@ -10,10 +10,6 @@ use Drupal\views\Plugin\views\wizard\WizardPluginBase; /** - * @todo: replace numbers with constants. - */ - -/** * Tests creating user views with the wizard. * * @ViewsWizard( @@ -21,6 +17,8 @@ * base_table = "users", * title = @Translation("Users") * ) + * + * @todo: replace numbers with constants. */ class Users extends WizardPluginBase { diff --git a/core/modules/user/src/Tests/UserLoginTest.php b/core/modules/user/src/Tests/UserLoginTest.php index 43202d6..4913546 100644 --- a/core/modules/user/src/Tests/UserLoginTest.php +++ b/core/modules/user/src/Tests/UserLoginTest.php @@ -140,11 +140,14 @@ function testPasswordRehashOnLogin() { /** * Make an unsuccessful login attempt. * - * @param $account + * @param \Drupal\user\Entity\User $account * A user object with name and pass_raw attributes for the login attempt. - * @param $flood_trigger - * Whether or not to expect that the flood control mechanism will be - * triggered. + * @param mixed $flood_trigger + * (optional) Whether or not to expect that the flood control mechanism will + * be triggered. Defaults to NULL. + * - Set to 'user' to expect a 'too many failed logins error. + * - Set to any value to expect an error for too many failed logins per IP. + * - Set to NULL to expect a failed login. */ function assertFailedLogin($account, $flood_trigger = NULL) { $edit = array( diff --git a/core/modules/user/src/UserStorageInterface.php b/core/modules/user/src/UserStorageInterface.php index 104c4ae..afcfcfb 100644 --- a/core/modules/user/src/UserStorageInterface.php +++ b/core/modules/user/src/UserStorageInterface.php @@ -13,12 +13,13 @@ /** * Defines an interface for user entity storage classes. */ -interface UserStorageInterface extends EntityStorageInterface{ +interface UserStorageInterface extends EntityStorageInterface { /** * Update the last login timestamp of the user. * * @param \Drupal\user\UserInterface $account + * User object to change. */ public function updateLastLoginTimestamp(UserInterface $account); diff --git a/core/modules/user/user.module b/core/modules/user/user.module index a251fd7..4026dc4 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1,5 +1,10 @@ 0, // Revoke 'administer nodes' @@ -1203,10 +1206,10 @@ function user_role_change_permissions($rid, array $permissions = array()) { /** * Grant permissions to a user role. * - * @param $rid + * @param mixed $rid * The ID of a user role to alter. - * @param $permissions - * A list of permission names to grant. + * @param array $permissions + * (optional) A list of permission names to grant. * * @see user_role_change_permissions() * @see user_role_revoke_permissions() @@ -1223,10 +1226,10 @@ function user_role_grant_permissions($rid, array $permissions = array()) { /** * Revoke permissions from a user role. * - * @param $rid + * @param mixed $rid * The ID of a user role to alter. - * @param $permissions - * A list of permission names to revoke. + * @param array $permissions + * (optional) A list of permission names to revoke. * * @see user_role_change_permissions() * @see user_role_grant_permissions() @@ -1244,10 +1247,7 @@ function user_role_revoke_permissions($rid, array $permissions = array()) { * Conditionally create and send a notification email when a certain * operation happens on the given user account. * - * @see user_mail_tokens() - * @see \Drupal\Core\Mail\MailManagerInterface::mail() - * - * @param $op + * @param string $op * The operation being performed on the account. Possible values: * - 'register_admin_created': Welcome message for user created by the admin. * - 'register_no_approval_required': Welcome message when user @@ -1259,19 +1259,20 @@ function user_role_revoke_permissions($rid, array $permissions = array()) { * - 'status_blocked': Account blocked. * - 'cancel_confirm': Account cancellation request. * - 'status_canceled': Account canceled. - * - * @param $account + * @param \Drupal\Core\Session\AccountInterface $account * The user object of the account being notified. Must contain at * least the fields 'uid', 'name', and 'mail'. - * @param $langcode - * Optional language code to use for the notification, overriding account + * @param string $langcode + * (optional) Language code to use for the notification, overriding account * language. * - * @return - * The return value from \Drupal::service('plugin.manager.mail')->mail(), if - * ends up being called. + * @return array + * An array containint various information about the message. + * See \Drupal\Core\Mail\MailManagerInterface::mail() for details. + * + * @see user_mail_tokens() */ -function _user_mail_notify($op, $account, $langcode = NULL) { +function _user_mail_notify($op, AccountInterface $account, $langcode = NULL) { // By default, we always notify except for canceled and blocked. $notify = \Drupal::config('user.settings')->get('notify.' . $op); if ($notify || ($op != 'status_canceled' && $op != 'status_blocked')) { @@ -1381,7 +1382,7 @@ function user_modules_uninstalled($modules) { /** * Saves visitor information as a cookie so it can be reused. * - * @param $values + * @param array $values * An array of key/value pairs to be saved into a cookie. */ function user_cookie_save(array $values) { @@ -1394,7 +1395,7 @@ function user_cookie_save(array $values) { /** * Delete a visitor information cookie. * - * @param $cookie_name + * @param string $cookie_name * A cookie name such as 'homepage'. */ function user_cookie_delete($cookie_name) {