mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
UserSession class - Refactor addon
This commit is contained in:
parent
8eca74cfab
commit
b0eb28143a
46 changed files with 534 additions and 580 deletions
|
@ -16,7 +16,6 @@ use Friendica\DI;
|
|||
use Friendica\Model\Notification;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Core\Config\Util\ConfigFileLoader;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
function public_server_install()
|
||||
|
@ -119,7 +118,7 @@ function public_server_login(App $a, $b)
|
|||
}
|
||||
|
||||
$fields = ['account_expires_on' => DateTimeFormat::utc('now +' . $days . ' days')];
|
||||
$condition = ["`uid` = ? AND `account_expires_on` > ?", Session::getLocalUser(), DBA::NULL_DATETIME];
|
||||
$condition = ["`uid` = ? AND `account_expires_on` > ?", DI::userSession()->getLocalUserId(), DBA::NULL_DATETIME];
|
||||
DBA::update('user', $fields, $condition);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue