You are here

public static function drupalchatController::drupalchat_return_profile_url in DrupalChat 8

1 call to drupalchatController::drupalchat_return_profile_url()
drupalchatController::_drupalchat_get_user_details in src/Controller/drupalchatController.php

File

src/Controller/drupalchatController.php, line 782
Contains Drupal\drupalchat\Controller\drupalchatController

Class

drupalchatController

Namespace

Drupal\drupalchat\Controller

Code

public static function drupalchat_return_profile_url() {
  $user = \Drupal::currentUser();
  $link = 'javascript:void(0)';
  if ($user
    ->isAuthenticated()) {
    $link = \Drupal\Core\Url::fromUserInput('/user/' . $user
      ->id(), array(
      'absolute' => TRUE,
    ))
      ->toString();
  }
  return $link;
}