We already have https://github.com/karlhungus/gitlabhq/blob/c5284f5fb3d18ed14e44792d31802b748c0c4352/app/models/user.rb#L212