mirror of
https://github.com/friendica/friendica
synced 2025-01-09 00:44:43 +00:00
Replace calls for App::setContactId() with AppHelper
This commit is contained in:
parent
6f14645a5f
commit
cad3311afb
1 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ class OpenWebAuth
|
||||||
*/
|
*/
|
||||||
public static function init(string $token)
|
public static function init(string $token)
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
$appHelper = DI::apphelper();
|
||||||
|
|
||||||
// Clean old OpenWebAuthToken entries.
|
// Clean old OpenWebAuthToken entries.
|
||||||
OpenWebAuthToken::purge('owt', '3 MINUTE');
|
OpenWebAuthToken::purge('owt', '3 MINUTE');
|
||||||
|
@ -144,7 +144,7 @@ class OpenWebAuth
|
||||||
*/
|
*/
|
||||||
Hook::callAll('magic_auth_success', $arr);
|
Hook::callAll('magic_auth_success', $arr);
|
||||||
|
|
||||||
$a->setContactId($arr['visitor']['id']);
|
$appHelper->setContactId($arr['visitor']['id']);
|
||||||
|
|
||||||
DI::sysmsg()->addInfo(DI::l10n()->t('OpenWebAuth: %1$s welcomes %2$s', DI::baseUrl()->getHost(), $visitor['name']));
|
DI::sysmsg()->addInfo(DI::l10n()->t('OpenWebAuth: %1$s welcomes %2$s', DI::baseUrl()->getHost(), $visitor['name']));
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class OpenWebAuth
|
||||||
*/
|
*/
|
||||||
public static function addVisitorCookieForHandle(string $handle): array
|
public static function addVisitorCookieForHandle(string $handle): array
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
$appHelper = DI::apphelper();
|
||||||
|
|
||||||
// Try to find the public contact entry of the visitor.
|
// Try to find the public contact entry of the visitor.
|
||||||
$cid = Contact::getIdForURL($handle);
|
$cid = Contact::getIdForURL($handle);
|
||||||
|
@ -183,7 +183,7 @@ class OpenWebAuth
|
||||||
|
|
||||||
DI::userSession()->setVisitorsContacts($visitor['url']);
|
DI::userSession()->setVisitorsContacts($visitor['url']);
|
||||||
|
|
||||||
$a->setContactId($visitor['id']);
|
$appHelper->setContactId($visitor['id']);
|
||||||
|
|
||||||
Logger::info('Authenticated visitor', ['url' => $visitor['url']]);
|
Logger::info('Authenticated visitor', ['url' => $visitor['url']]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue