partially reversion of the composer.json for merge considerations.
The set user function got lost during refactoring. Adding it back.