Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2988968
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/auth/view/PhabricatorAuthAccountView.php b/src/applications/auth/view/PhabricatorAuthAccountView.php
index f903f45d26..82ac7c6152 100644
--- a/src/applications/auth/view/PhabricatorAuthAccountView.php
+++ b/src/applications/auth/view/PhabricatorAuthAccountView.php
@@ -1,114 +1,114 @@
<?php
final class PhabricatorAuthAccountView extends AphrontView {
private $externalAccount;
private $provider;
public function setExternalAccount(
PhabricatorExternalAccount $external_account) {
$this->externalAccount = $external_account;
return $this;
}
public function setAuthProvider(PhabricatorAuthProvider $provider) {
$this->provider = $provider;
return $this;
}
public function render() {
$account = $this->externalAccount;
$provider = $this->provider;
require_celerity_resource('auth-css');
$content = array();
$dispname = $account->getDisplayName();
$username = $account->getUsername();
$realname = $account->getRealName();
$use_name = null;
if (phutil_nonempty_string($dispname)) {
$use_name = $dispname;
} else if (phutil_nonempty_string($username) &&
phutil_nonempty_string($realname)) {
$use_name = $username.' ('.$realname.')';
} else if (phutil_nonempty_string($username)) {
$use_name = $username;
} else if (phutil_nonempty_string($realname)) {
$use_name = $realname;
}
$content[] = phutil_tag(
'div',
array(
'class' => 'auth-account-view-name',
),
$use_name);
if ($provider) {
$prov_name = pht('%s Account', $provider->getProviderName());
} else {
$prov_name = pht('"%s" Account', $account->getProviderType());
}
$content[] = phutil_tag(
'div',
array(
'class' => 'auth-account-view-provider-name',
),
array(
$prov_name,
));
$account_uri = $account->getAccountURI();
- if (strlen($account_uri)) {
+ if (phutil_nonempty_string($account_uri)) {
// Make sure we don't link a "javascript:" URI if a user somehow
// managed to get one here.
if (PhabricatorEnv::isValidRemoteURIForLink($account_uri)) {
$account_uri = phutil_tag(
'a',
array(
'href' => $account_uri,
'target' => '_blank',
'rel' => 'noreferrer',
),
$account_uri);
}
$content[] = phutil_tag(
'div',
array(
'class' => 'auth-account-view-account-uri',
),
$account_uri);
}
$image_file = $account->getProfileImageFile();
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
$image_uri = $image_file->getURIForTransform($xform);
list($x, $y) = $xform->getTransformedDimensions($image_file);
$profile_image = phutil_tag(
'div',
array(
'class' => 'auth-account-view-profile-image',
'style' => 'background-image: url('.$image_uri.');',
));
return phutil_tag(
'div',
array(
'class' => 'auth-account-view',
),
array(
$profile_image,
$content,
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Feb 22, 17:23 (10 h, 17 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1147248
Default Alt Text
(3 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment