You are here

interface UserManagerInterface in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  2. 8 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  3. 8.2 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  4. 8.3 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  5. 8.4 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  6. 8.5 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  7. 8.6 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface
  8. 8.8 modules/custom/social_auth_extra/src/UserManagerInterface.php \Drupal\social_auth_extra\UserManagerInterface

Interface UserManagerInterface.

@package Drupal\social_auth_extra

Hierarchy

Expanded class hierarchy of UserManagerInterface

All classes that implement UserManagerInterface

1 file declares its use of UserManagerInterface
social_sso.module in modules/social_features/social_sso/social_sso.module
Module file for Social SSO.

File

modules/custom/social_auth_extra/src/UserManagerInterface.php, line 14

Namespace

Drupal\social_auth_extra
View source
interface UserManagerInterface {

  /**
   * Returns key-name of a social network.
   *
   * @return string
   *   Key-name of the social network.
   */
  public function getSocialNetworkKey();

  /**
   * Creates object of a new account.
   *
   * @param array $values
   *   Additional fields to save in the created account.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   Object of a new user account.
   */
  public function createAccount(array $values = []);

  /**
   * Creates object of a new profile.
   *
   * @param array $values
   *   Additional fields to save in the created profile.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   Object of a new user profile.
   */
  public function createProfile(array $values = []);

  /**
   * Download and set the picture to profile.
   *
   * @param string $url
   *   Absolute URL of a picture.
   * @param string $account_id
   *   Identifier of account on social network.
   *
   * @return bool
   *   Returns TRUE if the picture was saved successfully, FALSE if it didn't.
   */
  public function setProfilePicture($url, $account_id);

  /**
   * Saves the picture from URL.
   *
   * @param string $url
   *   Absolute URL of a picture.
   * @param string $account_id
   *   Identifier of account on social network.
   *
   * @return bool|object
   *   Object of created file or FALSE when error has occurred.
   */
  public function downloadProfilePicture($url, $account_id);

  /**
   * Returns directory path to save picture.
   *
   * @return bool|string
   *   Directory path or FALSE when error has occurred.
   */
  public function getPictureDirectory();

  /**
   * Set the account ID to the account on this site.
   *
   * @param string $account_id
   *   Identifier of account on this site.
   *
   * @return null
   *   Returns null.
   */
  public function setAccountId($account_id);

  /**
   * Get the account ID to the account on this site.
   *
   * @return string
   *   Account ID on this site.
   */
  public function getAccountId();

  /**
   * Set an instance of profile to user manager to use it later.
   *
   * @param \Drupal\profile\Entity\ProfileInterface $profile
   *   Profile instance.
   *
   * @return null
   *   Returns null.
   */
  public function setProfile(ProfileInterface $profile);

  /**
   * Set an instance of user account to user manager to use it later.
   *
   * @param \Drupal\user\UserInterface $account
   *   User account.
   *
   * @return null
   *   Returns null.
   */
  public function setAccount(UserInterface $account);

  /**
   * Set an instance of a field definition that contains picture.
   *
   * @param \Drupal\Core\Field\FieldDefinitionInterface $field
   *   Field definition containing the picture.
   *
   * @return null
   *   Returns null.
   */
  public function setFieldPicture(FieldDefinitionInterface $field);

  /**
   * Set the profile type.
   *
   * @param string $profile_type
   *   Profile type.
   */
  public function setProfileType($profile_type);

}

Members

Namesort descending Modifiers Type Description Overrides
UserManagerInterface::createAccount public function Creates object of a new account. 1
UserManagerInterface::createProfile public function Creates object of a new profile. 1
UserManagerInterface::downloadProfilePicture public function Saves the picture from URL. 1
UserManagerInterface::getAccountId public function Get the account ID to the account on this site. 4
UserManagerInterface::getPictureDirectory public function Returns directory path to save picture. 1
UserManagerInterface::getSocialNetworkKey public function Returns key-name of a social network. 4
UserManagerInterface::setAccount public function Set an instance of user account to user manager to use it later. 1
UserManagerInterface::setAccountId public function Set the account ID to the account on this site. 4
UserManagerInterface::setFieldPicture public function Set an instance of a field definition that contains picture. 1
UserManagerInterface::setProfile public function Set an instance of profile to user manager to use it later. 1
UserManagerInterface::setProfilePicture public function Download and set the picture to profile. 1
UserManagerInterface::setProfileType public function Set the profile type. 1