Move notify_user and related code to a helper so can access from views as well. [#81971890]