You asked Phalcon to return not the whole model entity but only two columns. So I think that Phalcon is returning you only a row as an array.
Try this to look what have you received as $user
:
var_dump($user);
Error says you have received an object of Phalcon\Mvc\Model\Row like here http://docs.phalcon.io/en/latest/api/Phalcon_Mvc_Model_Row.html.
It does not have magic getters/setters. Only array.
Look at the docs on this page http://docs.phalcon.io/en/latest/reference/models.html#finding-records go to the table "The available query options", row "columns". It says:
Return specific columns instead of the full columns in the model. When using this option an incomplete object is returned
So to get the id you should do this:
echo $user['id'];
Or you need to change your query to:
$user = Users::findFirst(array(
"id = '".$this->ses['id']."'",
));
So that you will receive complete model entity. And then as you wanted:
$user->getId();