Function __global->enforce_sessioned_url

Definitions

sources/users.php

  • Make sure that the given URL contains a session if cookies are disabled.NB: This is used for login redirection. It had to add the session ID into the redirect URL.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$url URLPATH No No required parameter N/A N/A The URL to enforce results in session persistence for the user

Returns

  • The fixed URL (potentially nothing was done, depending on cookies)
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make sure that the given URL contains a session if cookies are disabled.NB: This is used for login redirection. It had to add the session ID into the redirect URL.
 *
 * @param  URLPATH $url The URL to enforce results in session persistence for the user
 * @return URLPATH The fixed URL (potentially nothing was done, depending on cookies)
 */

function enforce_sessioned_url(string $url) : string