Jump to content

Check if member is validated


Recommended Posts

I have a script that checks if the user is the the group guest (not logged in at all) or members and allow access only to members to the page. However you can access the page as soon as you have registered, you don't even have to confirm your email (we even have manual validation on), so I was wondering if there is a way to check if the account is verified and then deny access.


// Initialize IPS4 Framework

require_once( '../init.php' );
require_once( '../conf_global.php' );
require_once( 'pnum.php' );

// Indicate that we should consider this a front-end session so we can obtain the currently logged in users information.

// Grab the currently Logged In user.

$member = \IPS\Member::loggedIn();
if ($member->mgroup_others) {
    $cn_membergroups = explode(',', $member->mgroup_others);

$cn_membergroups[] = $member->member_group_id;
if (!in_array(3, $cn_membergroups)) {
    //Don't allow access
} else {
//display the page


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...