You are here

class MiniorangeUser in Google Authenticator / 2 Factor Authentication - 2FA 7

Hierarchy

Expanded class hierarchy of MiniorangeUser

File

classes/User.php, line 3

View source
class MiniorangeUser {
  private $customerId;
  private $username;
  private $phone;
  private $name;
  private $authType;
  private $email;
  public function __construct($customerId, $username, $phone, $name, $authType, $email = "") {
    $this->customerId = $customerId;
    $this->username = $username;
    $this->phone = str_replace(" ", "", $phone);
    $this->name = $name;
    $this->authType = $authType;
    $this->email = $email;
  }
  public function update() {
    $apiKey = variable_get('mo_auth_customer_api_key', NULL);
    if (is_null($this->customerId) || is_null($apiKey)) {
      return FALSE;
    }
    $usersAPIHandler = new UsersAPIHandler($this->customerId, $apiKey);
    $response = $usersAPIHandler
      ->update($this);
  }
  public function create() {
    $apiKey = variable_get('mo_auth_customer_api_key', NULL);
    if (is_null($this->customerId) || is_null($apiKey)) {
      return FALSE;
    }
    $usersAPIHandler = new UsersAPIHandler($this->customerId, $apiKey);
    $response = $usersAPIHandler
      ->create($this);
  }
  public function search() {
    $apiKey = variable_get('mo_auth_customer_api_key', NULL);
    if (is_null($this->customerId) || is_null($apiKey)) {
      return FALSE;
    }
    $usersAPIHandler = new UsersAPIHandler($this->customerId, $apiKey);
    $response = $usersAPIHandler
      ->search($this);
  }
  public function get() {
    $apiKey = variable_get('mo_auth_customer_api_key', NULL);
    if (is_null($this->customerId) || is_null($apiKey)) {
      return FALSE;
    }
    $usersAPIHandler = new UsersAPIHandler($this->customerId, $apiKey);
    $response = $usersAPIHandler
      ->get($this);
  }
  public function getCustomerID() {
    return $this->customerId;
  }
  public function setCustomerID($customerId) {
    $this->customerId = $customerId;
  }
  public function getUsername() {
    return $this->username;
  }
  public function setUsername($username) {
    $this->username = $username;
  }
  public function getEmail() {
    return $this->email;
  }
  public function setEmail($email) {
    $this->email = $email;
  }
  public function getPhone() {
    return $this->phone;
  }
  public function setPhone($phone) {
    $this->phone = $phone;
  }
  public function getName() {
    return $this->name;
  }
  public function setName($name) {
    $this->name = $name;
  }
  public function getAuthType() {
    return $this->authType;
  }
  public function setAuthType($authType) {
    $this->authType = $authType;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MiniorangeUser::$authType private property
MiniorangeUser::$customerId private property
MiniorangeUser::$email private property
MiniorangeUser::$name private property
MiniorangeUser::$phone private property
MiniorangeUser::$username private property
MiniorangeUser::create public function
MiniorangeUser::get public function
MiniorangeUser::getAuthType public function
MiniorangeUser::getCustomerID public function
MiniorangeUser::getEmail public function
MiniorangeUser::getName public function
MiniorangeUser::getPhone public function
MiniorangeUser::getUsername public function
MiniorangeUser::search public function
MiniorangeUser::setAuthType public function
MiniorangeUser::setCustomerID public function
MiniorangeUser::setEmail public function
MiniorangeUser::setName public function
MiniorangeUser::setPhone public function
MiniorangeUser::setUsername public function
MiniorangeUser::update public function
MiniorangeUser::__construct public function