fetch_assoc(); if ($user == null) header('Location: articles.php'); $view = '

' . $user['username'] . '

'; // TODO: Allow user to update profile picture. // // if ((isset($_COOKIE['user_id']) && $_COOKIE['user_id'] == $user_id) || (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2)) { $view .= '

User Actions

'; } else { $ids = articles_ids_by_author($_GET['user_id']); $view .= '
'; foreach ($ids as $id) $view .= article_card($id); $view .= '
'; } return $view; }