check if we have an active profile in session

This bay be empty with use of cli_install.php and can be set when using
the --as-user <username> arguments with this script.