如何从$ _SESSION获取作者的id和名称到数据库?

I have problem on my website. I have editor of articles and I want to get to each article name and id of user who create this article. This data I give from $_SESSION. In file EditorController.php I have this code:

$managerUsers = new ManagerUsers();
$user = $managerUsers->returnUser();
$this->data['author'] = $user['name'];
$this->data['author_id'] = $user['users_id'];
$review = array(
          'reviews_id' => '',
          'author_id' => '',
          'author' => '',
if ($_POST)
            {
             $keys = array($author_id, $author, 'title', 'content', 'url', 
'description', 'keywords');
             $review = array_intersect_key($_POST, array_flip($keys));

and in view editor.phtml I have this:

<input type="hidden" name="author_id" value="<?= $review['author_id'] ?>" />
<input type="hidden" name="author" value="<?= $review['author'] ?>" />

but when I save article to the database this two parameters aren't saved. I gave to the view this:

<?= $author_id, $author ?> and everything works OK, to the view is write id and name of the user who is now log in. So I thing that, there:

$managerUsers = new ManagerUsers();
$user = $managerUsers->returnUser();
$this->data['author'] = $user['name'];
$this->data['author_id'] = $user['users_id'];

isn't any problem. Please give me some advice where is problem and how to fix it. For all advices thanks to you in advance.

1) quick'n'dirty

If you pass author and author_id through your form using hidden fields, you have to use these fields.

-$keys = array($author_id, $author, 'title', 'content', 'url', 'description', 'keywords');
+$keys = array('author_id', 'author', 'title', 'content', 'url', 'description', 'keywords');

2) better way

Leave those two keys out and add them directly

$keys = array('title', 'content', 'url', 'description', 'keywords');
$review = array_intersect_key($_POST, array_flip($keys));
$review['author'] = $user['name'];
$review['author_id'] = $user['users_id'];

3) maybe best way

Kind of the same as 2, but add "template" $review before and merge form values.

$managerUsers = new ManagerUsers();
$user = $managerUsers->returnUser();
$this->data['author'] = $user['name'];
$this->data['author_id'] = $user['users_id'];
$review = array(
    'reviews_id' => '',
    'author_id' => $user['users_id'],
    'author' => $user['name'],
);
if ($_POST) {
    $keys = array('title', 'content', 'url', 'description', 'keywords');
    $review = array_merge(
        $review,
        array_intersect_key($_POST, array_flip($keys)
    );
    // do something with $review
}