phpBB

Code Changes

File: phpbb/notification/method/messenger_base.php

  Unmodified   Added   Modified   Removed
Line 12Line 12
*/

namespace phpbb\notification\method;

*/

namespace phpbb\notification\method;

 

use phpbb\notification\type\type_interface;


/**
* Abstract notification method handling email and jabber notifications


/**
* Abstract notification method handling email and jabber notifications

Line 40Line 42
		$this->user_loader = $user_loader;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;

		$this->user_loader = $user_loader;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;

 
	}

/**
* Is this method available for the user?
* This is checked on the notifications options
*
* @param type_interface $notification_type An optional instance of a notification type. This method returns false
* only if the type is provided and if it doesn't provide an email template.
* @return bool
*/
public function is_available(type_interface $notification_type = null)
{
return $notification_type === null || $notification_type->get_email_template() !== false;

	}

/**

	}

/**

Line 72Line 87
		$banned_users = phpbb_get_banned_user_ids($user_ids);

// Load all the users we need

		$banned_users = phpbb_get_banned_user_ids($user_ids);

// Load all the users we need

		$this->user_loader->load_users($user_ids);

		$this->user_loader->load_users(array_diff($user_ids, $banned_users), array(USER_IGNORE));


// Load the messenger
if (!class_exists('messenger'))


// Load the messenger
if (!class_exists('messenger'))

Line 92Line 107

$user = $this->user_loader->get_user($notification->user_id);



$user = $this->user_loader->get_user($notification->user_id);


			if ($user['user_type'] == USER_IGNORE || ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL) || in_array($notification->user_id, $banned_users))

			if ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL)

			{
continue;
}

			{
continue;
}