You are here

protected function JanrainUserProfile::getPhoneNumber in Janrain Registration 8

Returns a phone number by the type.

Parameters

string $type: Available types: "home", "fax", "work" and "mobile".

Return value

string The phone number.

4 calls to JanrainUserProfile::getPhoneNumber()
JanrainUserProfile::getPhoneFaxNumber in src/User/JanrainUserProfile.php
JanrainUserProfile::getPhoneHomeNumber in src/User/JanrainUserProfile.php
JanrainUserProfile::getPhoneMobileNumber in src/User/JanrainUserProfile.php
JanrainUserProfile::getPhoneWorkNumber in src/User/JanrainUserProfile.php

File

src/User/JanrainUserProfile.php, line 100

Class

JanrainUserProfile
The user profile on Janrain.

Namespace

Drupal\janrain_capture\User

Code

protected function getPhoneNumber($type = 'mobile') : string {
  return isset($this->data->phoneNumber->{$type}) ? (string) $this->data->phoneNumber->{$type} : '';
}