1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01:00
php-phpbb/tests/mock/notifications_auth.php
2014-05-27 20:51:13 +02:00

45 lines
909 B
PHP

<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
class phpbb_mock_notifications_auth extends \phpbb\auth\auth
{
function acl_get_list($user_id = false, $opts = false, $forum_id = false)
{
$user_id = (!is_array($user_id)) ? array($user_id) : $user_id;
$opts = (!is_array($opts)) ? array($opts) : $opts;
$forum_id = (!is_array($forum_id)) ? array($forum_id) : $forum_id;
$auth_list = array();
foreach ($forum_id as $fid)
{
foreach ($opts as $opt)
{
$auth_list[$fid][$opt] = array();
foreach ($user_id as $uid)
{
$auth_list[$fid][$opt][] = $uid;
}
}
}
return $auth_list;
}
function acl_get($opt, $f = 0)
{
return true;
}
}