From 47585152dd9be3b649f947d107173aee125828a1 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Fri, 26 Jun 2020 16:45:09 +0300 Subject: [PATCH 1/4] #1741 Packages-Module bugs (critical) --- .../visiosoft/advs-module/resources/css/post-category.css | 2 +- .../visiosoft/advs-module/resources/views/new-ad/post-cat.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/css/post-category.css b/addons/default/visiosoft/advs-module/resources/css/post-category.css index 45e145bd1..7fd003dbb 100644 --- a/addons/default/visiosoft/advs-module/resources/css/post-category.css +++ b/addons/default/visiosoft/advs-module/resources/css/post-category.css @@ -61,7 +61,7 @@ padding: 5px 30px 7px; color: #fff; border: 1px solid #dadada; - margin-right: 5px; + display: inline-block; } .cat-select::-webkit-scrollbar { diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig index 7776c2240..866f34d75 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig @@ -76,7 +76,7 @@
-
+
From dc124f7a00af0df3cbbf1af60b4eead6e1cfbfcc Mon Sep 17 00:00:00 2001 From: Diatrex Date: Mon, 29 Jun 2020 18:21:09 +0300 Subject: [PATCH 2/4] =?UTF-8?q?#1733=20Patron=20yar=C4=B1s=C4=B1=20-=20exp?= =?UTF-8?q?ense=20showing=20data=20(rapor=20g=C3=B6sterilmesi)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Validation/ValidateCredentials.php | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php index 83ea1166c..78d7307ce 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php @@ -4,28 +4,31 @@ use Anomaly\Streams\Platform\Addon\Extension\ExtensionCollection; use Anomaly\UsersModule\User\Authenticator\Contract\AuthenticatorExtensionInterface; use Anomaly\UsersModule\User\Contract\UserInterface; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; +use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Http\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Visiosoft\ProfileModule\Profile\Events\SendEmptyPassword; use Visiosoft\ProfileModule\Profile\SignIn\SignInFormBuilder; - class ValidateCredentials { private $extensions; private $repository; private $dispatcher; + private $config; public function __construct( ExtensionCollection $extensions, UserRepositoryInterface $userRepository, - Dispatcher $dispatcher + Dispatcher $dispatcher, + Repository $config ) { $this->extensions = $extensions; $this->repository = $userRepository; $this->dispatcher = $dispatcher; + $this->config = $config; } public function authenticate(array $credentials) @@ -37,20 +40,22 @@ class ValidateCredentials /* @var AuthenticatorExtensionInterface $authenticator */ foreach ($authenticators as $authenticator) { if ($authenticator->slug == "default_authenticator") { - if (!isset($credentials['password']) && !isset($credentials['email'])) { + $method = $this->config->get('anomaly.module.users::config.login'); + + if (!isset($credentials['password']) && !isset($credentials[$method])) { $response = null; } - //Is email or phone number - if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) { - $possiblePhone = $credentials['email']; - if (substr($credentials['email'], 0, 1) == 0) { - $possiblePhone = substr($credentials['email'], 1); + //Is email/username or phone number + if (!filter_var($credentials[$method], FILTER_VALIDATE_EMAIL)) { + $possiblePhone = $credentials[$method]; + if (substr($credentials[$method], 0, 1) == 0) { + $possiblePhone = substr($credentials[$method], 1); } if ($user = $this->repository ->newQuery() ->where('gsm_phone', 'LIKE', "%$possiblePhone")->first()) { - $credentials['email'] = $user->email; + $credentials[$method] = $user->email; } } $response = $this->repository->findByCredentials($credentials); From 7bae9e271f85ef24c70dc9e236d3369c0622101e Mon Sep 17 00:00:00 2001 From: Diatrex Date: Mon, 29 Jun 2020 18:26:33 +0300 Subject: [PATCH 3/4] =?UTF-8?q?#1733=20Patron=20yar=C4=B1s=C4=B1=20-=20exp?= =?UTF-8?q?ense=20showing=20data=20(rapor=20g=C3=B6sterilmesi)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Validation/ValidateCredentials.php | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php index 78d7307ce..8ffc7b96c 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php @@ -4,31 +4,28 @@ use Anomaly\Streams\Platform\Addon\Extension\ExtensionCollection; use Anomaly\UsersModule\User\Authenticator\Contract\AuthenticatorExtensionInterface; use Anomaly\UsersModule\User\Contract\UserInterface; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; -use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Http\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Visiosoft\ProfileModule\Profile\Events\SendEmptyPassword; use Visiosoft\ProfileModule\Profile\SignIn\SignInFormBuilder; + class ValidateCredentials { private $extensions; private $repository; private $dispatcher; - private $config; public function __construct( ExtensionCollection $extensions, UserRepositoryInterface $userRepository, - Dispatcher $dispatcher, - Repository $config + Dispatcher $dispatcher ) { $this->extensions = $extensions; $this->repository = $userRepository; $this->dispatcher = $dispatcher; - $this->config = $config; } public function authenticate(array $credentials) @@ -40,22 +37,20 @@ class ValidateCredentials /* @var AuthenticatorExtensionInterface $authenticator */ foreach ($authenticators as $authenticator) { if ($authenticator->slug == "default_authenticator") { - $method = $this->config->get('anomaly.module.users::config.login'); - - if (!isset($credentials['password']) && !isset($credentials[$method])) { + if (!isset($credentials['password']) && !isset($credentials['email'])) { $response = null; } //Is email/username or phone number - if (!filter_var($credentials[$method], FILTER_VALIDATE_EMAIL)) { - $possiblePhone = $credentials[$method]; - if (substr($credentials[$method], 0, 1) == 0) { - $possiblePhone = substr($credentials[$method], 1); + if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) { + $possiblePhone = $credentials['email']; + if (substr($credentials['email'], 0, 1) == 0) { + $possiblePhone = substr($credentials['email'], 1); } if ($user = $this->repository ->newQuery() ->where('gsm_phone', 'LIKE', "%$possiblePhone")->first()) { - $credentials[$method] = $user->email; + $credentials['email'] = $user->email; } } $response = $this->repository->findByCredentials($credentials); From 9ea95b70b06c86a48ad17f50625fb0322e8dcd1b Mon Sep 17 00:00:00 2001 From: Diatrex Date: Mon, 29 Jun 2020 18:27:01 +0300 Subject: [PATCH 4/4] =?UTF-8?q?#1733=20Patron=20yar=C4=B1s=C4=B1=20-=20exp?= =?UTF-8?q?ense=20showing=20data=20(rapor=20g=C3=B6sterilmesi)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Profile/Validation/ValidateCredentials.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php index 8ffc7b96c..83ea1166c 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php @@ -41,7 +41,7 @@ class ValidateCredentials $response = null; } - //Is email/username or phone number + //Is email or phone number if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) { $possiblePhone = $credentials['email']; if (substr($credentials['email'], 0, 1) == 0) {