From 02093ecbdd72ffaf51e8ece92fc9ef5bb0c8475f Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Fri, 16 Feb 2018 19:11:41 -0500 Subject: [PATCH] Extensibility: Allow plugins to munge user params --- app/controllers/users_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4d0726d865a..0ccaa731029 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -975,7 +975,12 @@ class UsersController < ApplicationController result.merge!(params.permit(:active, :staged, :approved)) end - result + modify_user_params(result) + end + + # Plugins can use this to modify user parameters + def modify_user_params(attrs) + attrs end def user_locale