/**
 * Checks the user session.
 *
 * If the session record doesn't exist, initialise it.
 * If session is new, create session variables
 *
 * @return  void
 *
 * @since   3.2
 * @throws  \RuntimeException
 */
public function checkSession()
{
    $this->getContainer()->get(MetadataManager::class)->createOrUpdateRecord($this->getSession(), $this->getIdentity());
}