Add modified attributes for user and command vars.

Fixes #6043