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:
2026-08-13 00:24:54 +08:00
parent 0b06b2c7df
commit 8241570ca2
67 changed files with 780 additions and 1127 deletions
+2 -7
View File
@@ -34,15 +34,11 @@ if (!function_exists('aksrt_get_user_home_page_context')) {
'posts_per_page' => 10,
];
$user_center_settings = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_user_center_settings()
: ['social_links' => true];
$post_count = (int) ($dashboard['post_count'] ?? 0);
$comment_count = (int) ($dashboard['comment_count'] ?? 0);
$favorite_post_ids = $dashboard['favorite_post_ids'] ?? [];
$favorite_count = (int) ($dashboard['favorite_count'] ?? 0);
$user_contacts = $dashboard['user_contacts'] ?? [];
$profile_details = $dashboard['profile_details'] ?? [];
$per_page = max(1, (int) ($user_home_settings['posts_per_page'] ?? 10));
$credits_enabled = !empty($dashboard['credits_enabled']);
$credit_balance = $dashboard['credit_balance'] ?? 0.0;
@@ -118,8 +114,7 @@ if (!function_exists('aksrt_get_user_home_page_context')) {
'dashboard' => $dashboard,
'is_own_profile' => $is_own_profile,
'user_home_settings' => $user_home_settings,
'user_center_settings' => $user_center_settings,
'user_contacts' => $user_contacts,
'profile_details' => $profile_details,
'post_count' => $post_count,
'comment_count' => $comment_count,
'favorite_post_ids' => $favorite_post_ids,