diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-18 08:41:41 +0200 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-18 08:41:41 +0200 |
commit | 7da97c198182f8f6f4286e16d80de205431d81bb (patch) | |
tree | d03c22c98fa5e522fef874554be307969154c792 /include/account.php | |
parent | 4f793069bf4aafcfe77d50e47690173104ef23c7 (diff) | |
parent | 0b47fb9a91b58147e616ea75a23dea0d431c40f8 (diff) | |
download | volse-hubzilla-7da97c198182f8f6f4286e16d80de205431d81bb.tar.gz volse-hubzilla-7da97c198182f8f6f4286e16d80de205431d81bb.tar.bz2 volse-hubzilla-7da97c198182f8f6f4286e16d80de205431d81bb.zip |
Merge pull request #3 from friendica/master
Merge from upstream
Diffstat (limited to 'include/account.php')
-rw-r--r-- | include/account.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/account.php b/include/account.php index a3d6ef025..df484e608 100644 --- a/include/account.php +++ b/include/account.php @@ -616,6 +616,29 @@ function service_class_fetch($uid,$property) { return((array_key_exists($property,$arr)) ? $arr[$property] : false); } +// like service_class_fetch but queries by account rather than channel + +function account_service_class_fetch($aid,$property) { + + $r = q("select account_service_class as service_class from account where account_id = %d limit 1", + intval($aid) + ); + if($r !== false && count($r)) { + $service_class = $r[0]['service_class']; + } + + if(! x($service_class)) + return false; // everything is allowed + + $arr = get_config('service_class',$service_class); + + if(! is_array($arr) || (! count($arr))) + return false; + + return((array_key_exists($property,$arr)) ? $arr[$property] : false); +} + + function upgrade_link($bbcode = false) { $l = get_config('service_class','upgrade_link'); if(! $l) |