2021-11-12 20:08:36 +00:00
|
|
|
<?php
|
2024-08-24 12:31:41 +00:00
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2021-11-12 20:08:36 +00:00
|
|
|
/**
|
|
|
|
* Name: TEST-ADDON: Authentication "allow all"
|
|
|
|
* Description: For testing purpose only
|
|
|
|
* Version: 1.0
|
|
|
|
* Author: Philipp Holzer <admin@philipp.info>
|
|
|
|
*/
|
|
|
|
|
|
|
|
use Friendica\Core\Hook;
|
|
|
|
use Friendica\Model\User;
|
|
|
|
|
|
|
|
function authtest_install()
|
|
|
|
{
|
|
|
|
Hook::register('authenticate', 'tests/Util/authtest/authtest.php', 'authtest_authenticate');
|
|
|
|
}
|
|
|
|
|
2023-01-14 14:46:49 +00:00
|
|
|
function authtest_authenticate(&$b)
|
2021-11-12 20:08:36 +00:00
|
|
|
{
|
2021-11-30 19:53:47 +00:00
|
|
|
$b['authenticated'] = \Friendica\Test\Util\AuthTestConfig::$authenticated;
|
|
|
|
$b['user_record'] = User::getById(\Friendica\Test\Util\AuthTestConfig::$user_id);
|
2021-11-12 20:08:36 +00:00
|
|
|
}
|