From a7cc8d9867385a28dae7281876c226d2e44d6296 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 16 Jul 2019 14:14:56 +0300 Subject: [PATCH] withTrashed added --- .../profile-module/src/Http/Controller/UserAuthenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php index 8941c37a0..fa99e766f 100644 --- a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php +++ b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php @@ -165,7 +165,7 @@ class UserAuthenticator } - if ($users->findByEmail($all['email']) or $users->findByUsername($all['username'])) { + if (User::withTrashed()->where('email',$all['email'])->first() or User::withTrashed()->where('username',$all['username'])->first()) { return response()->json(['status' => 'error', 'message' => 'This Username or Email Registered!']); } $opassword = str_random(8);