mirror of
https://github.com/friendica/friendica
synced 2025-04-30 07:44:22 +02:00
Adapt BaseURL calls to new UriInterface
This commit is contained in:
parent
9e6d95284b
commit
f0c29edcde
101 changed files with 218 additions and 241 deletions
|
@ -230,11 +230,11 @@ class Authentication
|
|||
|
||||
// Otherwise it's probably an openid.
|
||||
try {
|
||||
$openid = new LightOpenID($this->baseUrl->getHostname());
|
||||
$openid = new LightOpenID($this->baseUrl->getHost());
|
||||
$openid->identity = $openid_url;
|
||||
$this->session->set('openid', $openid_url);
|
||||
$this->session->set('remember', $remember);
|
||||
$openid->returnUrl = $this->baseUrl->get(true) . '/openid';
|
||||
$openid->returnUrl = $this->baseUrl . '/openid';
|
||||
$openid->optional = ['namePerson/friendly', 'contact/email', 'namePerson', 'namePerson/first', 'media/image/aspect11', 'media/image/default'];
|
||||
System::externalRedirect($openid->authUrl());
|
||||
} catch (Exception $e) {
|
||||
|
@ -329,8 +329,8 @@ class Authentication
|
|||
'mobile-theme' => $this->pConfig->get($user_record['uid'], 'system', 'mobile_theme'),
|
||||
'authenticated' => 1,
|
||||
'page_flags' => $user_record['page-flags'],
|
||||
'my_url' => $this->baseUrl->get() . '/profile/' . $user_record['nickname'],
|
||||
'my_address' => $user_record['nickname'] . '@' . substr($this->baseUrl->get(), strpos($this->baseUrl->get(), '://') + 3),
|
||||
'my_url' => $this->baseUrl . '/profile/' . $user_record['nickname'],
|
||||
'my_address' => $user_record['nickname'] . '@' . substr($this->baseUrl, strpos($this->baseUrl, '://') + 3),
|
||||
'addr' => $this->remoteAddress,
|
||||
'nickname' => $user_record['nickname'],
|
||||
]);
|
||||
|
|
|
@ -201,7 +201,7 @@ class ExAuth
|
|||
$sUser = str_replace(['%20', '(a)'], [' ', '@'], $aCommand[1]);
|
||||
|
||||
// Does the hostname match? So we try directly
|
||||
if ($this->baseURL->getHostname() == $aCommand[2]) {
|
||||
if ($this->baseURL->getHost() == $aCommand[2]) {
|
||||
$this->writeLog(LOG_INFO, 'internal user check for ' . $sUser . '@' . $aCommand[2]);
|
||||
$found = $this->dba->exists('user', ['nickname' => $sUser]);
|
||||
} else {
|
||||
|
@ -282,7 +282,7 @@ class ExAuth
|
|||
|
||||
$Error = false;
|
||||
// Does the hostname match? So we try directly
|
||||
if ($this->baseURL->getHostname() == $aCommand[2]) {
|
||||
if ($this->baseURL->getHost() == $aCommand[2]) {
|
||||
try {
|
||||
$this->writeLog(LOG_INFO, 'internal auth for ' . $sUser . '@' . $aCommand[2]);
|
||||
User::getIdFromPasswordAuthentication($sUser, $aCommand[3], true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue