From f68d29000e570a8c3bda9637cf7bacdb5b353a17 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 29 Jul 2017 20:43:31 +0200 Subject: [PATCH] Remove tests for 'onBeforeSuccess' callback of login methods --- tests/index.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/index.php b/tests/index.php index d8b216d..85cdf9d 100644 --- a/tests/index.php +++ b/tests/index.php @@ -57,16 +57,12 @@ function processRequestData(\Delight\Auth\Auth $auth) { $rememberDuration = null; } - $onBeforeSuccess = function ($userId) { - return \mt_rand(1, 100) <= 50; - }; - try { if (isset($_POST['email'])) { - $auth->login($_POST['email'], $_POST['password'], $rememberDuration, $onBeforeSuccess); + $auth->login($_POST['email'], $_POST['password'], $rememberDuration); } elseif (isset($_POST['username'])) { - $auth->loginWithUsername($_POST['username'], $_POST['password'], $rememberDuration, $onBeforeSuccess); + $auth->loginWithUsername($_POST['username'], $_POST['password'], $rememberDuration); } else { return 'either email address or username required';