FIX: If creating an active user via the API, create reviewables

This commit is contained in:
Robin Ward
2019-04-12 15:25:02 -04:00
parent f7ebfb1acc
commit ef1af53e05
2 changed files with 34 additions and 1 deletions

View File

@ -402,6 +402,9 @@ class UsersController < ApplicationController
session["user_created_message"] = activation.message
session[SessionController::ACTIVATE_USER_KEY] = user.id
# If the user was created as active, they might need to be approved
user.create_reviewable if user.active?
render json: {
success: true,
active: user.active?,