feat(users): govern profiles and access
Normalize fixed profile fields, profile actions, and the five-column capability matrix for comments, uploads, and downloads.
This commit is contained in:
@@ -149,8 +149,7 @@ if (!function_exists('aksrt_is_avatar_upload_enabled')) {
|
||||
* Whether local avatar uploads are enabled by attachment policy.
|
||||
*/
|
||||
function aksrt_is_avatar_upload_enabled(): bool {
|
||||
$settings = class_exists('\\AKSRT\\Settings\\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
return !isset($settings['allow_avatar_upload']) || !empty($settings['allow_avatar_upload']);
|
||||
return function_exists('aksrt_user_can') && aksrt_user_can('upload_avatar', get_current_user_id());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user