Assuming you mean a page outside of your Q2A site, then you can do this by first including some Q2A files
require_once $_SERVER['DOCUMENT_ROOT'] . '/qa/qa-include/qa-base.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/qa/qa-include/qa-app-users.php';
Then there are a few functions you can use. To check for specific users, you can do:
if (qa_get_logged_in_userid() === '1') {
// userid #1 is logged in (most likely your admin account)
}
To check for a type of user you can do:
if (qa_get_logged_in_level() >= QA_USER_LEVEL_MODERATOR) {
// user is at least moderator level
}
You can check retain flags like this:
if (qa_get_logged_in_flags() & QA_USER_FLAGS_EMAIL_CONFIRMED) {
// user has email confirmed; note the single & here
}