Open sumanta-ghosh opened 10 years ago
I modified getUserByIdentity methos in \vendor\zizaco\confide\src\Confide\EloquentRepository.php
public function getUserByIdentity($identity) {
$user = $this->model();
$condition = function($query) use ($identity) {
$firstWhere = true;
foreach ($identity as $attribute => $value) {
if ($firstWhere) {
$query->where($attribute, '=', $value);
} else {
$query->orWhere($attribute, '=', $value);
}
$firstWhere = false;
}
};
return $user->where($condition)->get()->first();
}
I don't know whether is't right process or wrong but it return me the correct result .
check this pr #421
No that is not my problem. My problem is different. Please check my image which I attache and check my requirement again
yep, I made a commit yesterday in that pr #421 to fix this soft delete problem after reading your issue.
@sumanta-ghosh I'm gonna take a look on this and make sure that Confide 4 will work well with Laravel soft deletion.
@Zizaco glad that you're back. I believe this issue is finally resolved and merged in #464
In log in attempt time I got this sql Array ( [query] => select * from
site_users
wheresite_users
.deleted_at
is null andemail
= ? orusername
= ? [bindings] => Array ( [0] => sumanta3 [1] => sumanta3 ))
Out put of this query is bellow image. and laravel return first row which marked as deleted and I don't want, I want only 2nd row which is not deleted.
Above SQL is wrong , parenthesis is missing there
select * from
site_users
wheresite_users
.deleted_at
is null and (email
= ? orusername
= ?)It will give the proper result