public function TwitterAuthManager::getUsername in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.2 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.3 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.5 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.6 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.7 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
- 8.8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getUsername()
Returns user on a social network if it possible.
Return value
string|false The user name on a social network or false.
Overrides AuthManager::getUsername
File
- modules/
custom/ social_auth_twitter/ src/ TwitterAuthManager.php, line 136
Class
- TwitterAuthManager
- Manages the authorization process before getting a long lived access token.
Namespace
Drupal\social_auth_twitterCode
public function getUsername() {
if (($profile = $this
->getProfile()) && isset($profile->screen_name)) {
return $profile->screen_name;
}
return parent::getUsername();
}