Author: Braulio Bhavamitra <braulio@prout.io>
stores_app/users: activate on signup
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/plugins/stores_app/app/controllers/profile/stores_app_plugin/users_controller.rb b/plugins/stores_app/app/controllers/profile/stores_app_plugin/users_controller.rb index 832a19a80047284cedfc81a9b0ae76d275838baa..e7ab8d941763fdac2530d09fc6c4b493739bc9ef 100644 --- a/plugins/stores_app/app/controllers/profile/stores_app_plugin/users_controller.rb +++ b/plugins/stores_app/app/controllers/profile/stores_app_plugin/users_controller.rb @@ -8,6 +8,8 @@ render json: UserSerializer.new(@user).to_hash else render json: {error: 'invalid_login_pass'} end + rescue # empty fields + render json: {error: 'invalid_login_pass'} end def signup @@ -29,6 +31,7 @@ @user.save! @user.person.user = @user @user.person.save! end + @user.activate profile.add_member @user.person render json: UserSerializer.new(@user).to_hash