mirror of
https://github.com/friendica/friendica
synced 2025-04-29 10:24:23 +02:00
Make API testable & move PhotoAlbum tests to new destination
This commit is contained in:
parent
a0c5c91886
commit
e477cf215d
10 changed files with 174 additions and 96 deletions
|
@ -65,6 +65,18 @@ class Authentication
|
|||
/** @var IManagePersonalConfigValues */
|
||||
private $pConfig;
|
||||
|
||||
/**
|
||||
* Sets the X-Account-Management-Status header
|
||||
*
|
||||
* mainly extracted to make it overridable for tests
|
||||
*
|
||||
* @param array $user_record
|
||||
*/
|
||||
protected function setXAccMgmtStatusHeader(array $user_record)
|
||||
{
|
||||
header('X-Account-Management-Status: active; name="' . $user_record['username'] . '"; id="' . $user_record['nickname'] . '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* Authentication constructor.
|
||||
*
|
||||
|
@ -314,7 +326,7 @@ class Authentication
|
|||
$this->session->set('cid', $contact['id']);
|
||||
}
|
||||
|
||||
header('X-Account-Management-Status: active; name="' . $user_record['username'] . '"; id="' . $user_record['nickname'] . '"');
|
||||
$this->setXAccMgmtStatusHeader($user_record);
|
||||
|
||||
if ($login_initial || $login_refresh) {
|
||||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue