public function SimpleFbConnectPostLoginManager::getPathToUserForm in Simple FB Connect 8.2
Same name and namespace in other branches
- 8.3 src/SimpleFbConnectPostLoginManager.php \Drupal\simple_fb_connect\SimpleFbConnectPostLoginManager::getPathToUserForm()
Returns the path to user's user form.
Parameters
\Drupal\user\Entity\User $drupal_user: User object.
Return value
string Path to user edit form.
File
- src/
SimpleFbConnectPostLoginManager.php, line 117 - Contains \Drupal\simple_fb_connect\SimpleFbConnectPostLoginManager.
Class
- SimpleFbConnectPostLoginManager
- Contains all logic that is related to post login redirects.
Namespace
Drupal\simple_fb_connectCode
public function getPathToUserForm(User $drupal_user) {
$uid = $drupal_user
->id();
$post_login_path = 'user/' . $uid . '/edit';
$url = $this->pathValidator
->getUrlIfValid($post_login_path);
return $url
->toString();
}