加入使用者機制

https://redmine.techbang.com/issues/12221
Open for review!
Use a guard clause instead of wrapping the code inside a conditional expression.