fixes #4407 Not applying tags to the imported users

Fixed the issue and pushed the code for review, please check it.