mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
Remove direct calls to App->user
This commit is contained in:
parent
266ee26240
commit
fc283ab928
51 changed files with 238 additions and 166 deletions
|
@ -26,12 +26,24 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\User;
|
||||
|
||||
/**
|
||||
* Handle ACL management and display
|
||||
*/
|
||||
class ACL
|
||||
{
|
||||
/**
|
||||
* Returns the default lock state for the given user id
|
||||
* @param int $uid
|
||||
* @return bool "true" if the default settings are non public
|
||||
*/
|
||||
public static function getLockstateForUserId(int $uid)
|
||||
{
|
||||
$user = User::getById($uid, ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid']);
|
||||
return !empty($user['allow_cid']) || !empty($user['allow_gid']) || !empty($user['deny_cid']) || !empty($user['deny_gid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a select input tag for private message recipient
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue