The Joomla version is 3.6.2 and the administrator was verifying the content of the trash. Some of the articles were restored, other articles were kept in trash. Finally, the "Empty trash" button was hit after selecting all the items in the list.
The results were: the articles were erased and the administrator was logged out automatically with the following message.
Warning
All the tables involving the users were clear, with the fields as they were before, no visible error or problem. The #__session table was cleared (with truncate). Finally the error was found: the first record in the #__assets table was missing, probably deleted along with the content of the trash. It was added using the sql query bellow (with the full table name, not `#__assets`), and everything was ok again.
INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
(1, 0, 0, 103, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}')
To be fully clear: the content of that Joomla site was imported from a custom site designed a few years earlier. The error may not appear in other Joomla websites, but it should be taken into consideration.