ARE YOU KIDDING MEEEEEEEEEEEEEEEEEEEE

This commit is contained in:
flash 2019-03-18 23:20:16 +01:00
parent 57b2674189
commit 105e0560bf

View file

@ -57,6 +57,7 @@ if ($isEditing) {
'background_attachments' => MSZ_USER_BACKGROUND_ATTACHMENTS_NAMES,
]);
if (!empty($_POST) && is_array($_POST)) {
if (!csrf_verify('profile', $_POST['csrf'] ?? '')) {
$notices[] = MSZ_TMP_USER_ERROR_STRINGS['csrf'];
} else {
@ -250,6 +251,7 @@ if ($isEditing) {
$isEditing = false;
}
}
}
$profile = user_profile_get($userId);
$relationInfo = user_session_active()
@ -290,7 +292,7 @@ switch ($profileMode) {
$following = user_relation_users_from($userId, MSZ_USER_RELATION_FOLLOW, $followingPagination['range'], $followingOffset, $currentUserId);
tpl_vars([
'title' => 'flash / following',
'title' => $profile['username'] . ' / following',
'canonical_url' => url('user-profile-following', ['user' => $userId]),
'profile_users' => $following,
'profile_relation_pagination' => $followingPagination,
@ -311,7 +313,7 @@ switch ($profileMode) {
$followers = user_relation_users_to($userId, MSZ_USER_RELATION_FOLLOW, $followerPagination['range'], $followerOffset, $currentUserId);
tpl_vars([
'title' => 'flash / followers',
'title' => $profile['username'] . ' / followers',
'canonical_url' => url('user-profile-followers', ['user' => $userId]),
'profile_users' => $followers,
'profile_relation_pagination' => $followerPagination,
@ -332,7 +334,7 @@ switch ($profileMode) {
$topics = forum_topic_listing_user($userId, $currentUserId, $topicsOffset, $topicsPagination['range']);
tpl_vars([
'title' => 'flash / topics',
'title' => $profile['username'] . ' / topics',
'canonical_url' => url('user-profile-forum-topics', ['user' => $userId]),
'profile_topics' => $topics,
'profile_topics_pagination' => $topicsPagination,