5 abstract class UserVersion {
8 * Create a new user account.
10 * @param array $properties
15 public function create($properties) {}
18 * Attempt to load a user account.
23 public function load_by_uid($uid) {
24 return user_load($uid);
28 * Attempt to load a user account.
33 public function load_by_name($name) {
34 return user_load_by_name($name);
38 * Attempt to load a user account.
43 public function load_by_mail($mail) {
44 return user_load_by_mail($mail);
48 * Load the current user account.
53 public function getCurrentUserAsAccount() {
59 * Load the current user account and return a UserSingle instance.
61 * @return \Drush\User\UserSingleBase
62 * A Drush UserSingle instance.
64 public function getCurrentUserAsSingle() {
65 return drush_usersingle_get_class($this->getCurrentUserAsAccount());
69 * Set the current "global" user account in Drupal.
74 public function setCurrentUser($account) {