Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
409 views
in Q2A Core by
Hi, I would like to set up a page to be only avaiable to those users that had confirmed their email address.

Any suggestion how can I go about that?

So far I'm able to filter to only registered users by doing

if (!isset($userid)){

... }

where $userid = qa_get_logged_in_userid();

but I don't know where to check for email confirmation
Q2A version: 1.6.2
by
edited by
sounds good that you are able to do this with registred users. what about doing it in the custom sidebar? thank you!

1 Answer

+1 vote
by

I am not sure where you want to perform check for the user who confirmed email address. But this is what you need to do.

if (qa_get_logged_in_flags() == QA_USER_FLAGS_EMAIL_CONFIRMED) {

    // your code

}

Above condition will check if user email address is confirmed by flag value. Which should be 1 if confirmed.

If you want to cross check if user is logged in (however it is not so required in this case) than you can use core function qa_is_logged_in() within the condition.

Hope this will helps you to what you want to do.

...