<?php/**
* @file
* Contains \Drupal\user\UserInterface.
*/namespaceDrupal\user;
useDrupal\Core\Entity\EntityInterface;
useDrupal\Core\Session\AccountInterface;
/**
* Provides an interface defining a user entity.
*/interfaceUserInterfaceextends EntityInterface, AccountInterface {
/**
* Returns a list of roles.
*
* @return array
* List of role IDs.
*/
public functiongetRoles();
/**
* Whether a user has a certain role.
*
* @param string $rid
* The role ID to check.
*
* @return bool
* Returns TRUE if the user has the role, otherwise FALSE.
*/
public functionhasRole($rid);
/**
* Add a role to a user.
*
* @param string $rid
* The role ID to add.
*/
public functionaddRole($rid);
/**
* Remove a role from a user.
*
* @param string $rid
* The role ID to remove.
*/
public functionremoveRole($rid);
}