From a16e6c63a58feb8c25e7d2985d8b7190c0f25a58 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Fri, 9 Oct 2020 16:55:18 +0300 Subject: [PATCH] #2220 points module (rewrite the sms verification module) !4 --- .../default/visiosoft/advs-module/src/Support/_helpers.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/default/visiosoft/advs-module/src/Support/_helpers.php b/addons/default/visiosoft/advs-module/src/Support/_helpers.php index 114eccbf0..45c94b635 100644 --- a/addons/default/visiosoft/advs-module/src/Support/_helpers.php +++ b/addons/default/visiosoft/advs-module/src/Support/_helpers.php @@ -24,4 +24,11 @@ if (!function_exists('get_buyables')) function get_buyables() { return dispatch_now(new GetBuyables()); } +} + +if (!function_exists('auth_id_if_null')) +{ + function auth_id_if_null($userId) { + return $userId ?: auth()->id(); + } } \ No newline at end of file