if ($user = $modx->getObject('modUser', $user_id)) {
    if ($profile = $user->getOne('Profile')) {
        $extended = $profile->get('extended');
        if ($extended['2fa']){
        	return $extended['2fa'];
        }
        		
    }
}
return false;