Closed samarulrajt closed 10 years ago
Hello,
wow very strange...i will watch it ;)
Julien
Thanks for quick reply! Tell me the ways to fix this.
Sam
Can you verify if you're only one user with id 1 in your production database ?
Can you replace this line (if it's okay i will fix it in the repository) in your project vendor (just for the test) : https://github.com/MrJuliuss/syntara/blob/master/src/controllers/UserController.php#L63
with : if(isset($bannedUsers) && $bannedUsers !== "" && bannedUsers !== "--")
(I can't reproduce on my own server or computer, but i think it will fix the problem)
Thanks Juliuss,
I reproduced as you said from this if(isset($bannedUsers) && $bannedUsers !== "") to if(isset($bannedUsers) && $bannedUsers !== "" && bannedUsers !== "--")
and it works fine.
Thanks ,
Sam
Hi, i will fix it in a release asap (the fix i gave you is not very proper, it's just for the test)
Julien
But still i get the same this when we search with banned as No. all other things with searches are ok
http://gyazo.com/6f02ae8362155c1142b1f223c96722b0
Thanks
Sam
Hmm, add this juste before the query in UserController (https://github.com/MrJuliuss/syntara/blob/master/src/controllers/UserController.php#L63)
if($bannedUsers == '0')
{
$bannedUsers = (int)$bannedUsers;
}
not easy to debug when you can reproduce the bug =/
Still that banned search as No not works if($bannedUsers == '0') { $bannedUsers = (int)$bannedUsers; } if(isset($bannedUsers) && $bannedUsers !== "" && $bannedUsers !== "--") {
$emptyUsers = $emptyUsers->join('throttle', 'throttle.user_id', '=', 'users.id')
->where('throttle.banned', '=', $bannedUsers)
->select('users.id', 'users.username', 'users.last_name', 'users.first_name', 'users.email', 'users.permissions', 'users.activated');
}
but it still not works . http://gyazo.com/6f02ae8362155c1142b1f223c96722b0
Thanks
Sam
Hm...which database ? which engine ?
mysql database and InnoDB engine
Could you launch this request in your production server :
select `users`.`id`, `users`.`username`, `users`.`last_name`, `users`.`first_name`, `users`.`email`, `users`.`permissions`, `users`.`activated`
from `users`
inner join `throttle` on `throttle`.`user_id` = `users`.`id`
where `throttle`.`banned` = 0
And tell me if you have a duplicate user in the result.
i get the result as http://gyazo.com/5ae2c1a0fc0f30a3a5e3b3165c89fe43
Hi Juliuss
I solved it via throttle where i had same userid dublicated for each ip address so i removed dublicated userid from throttle and that solved my problem. i really don't know the use of this throttle table.
but still that throttle
http://gyazo.com/b4b1ba17a83bf6cb6206a5b39b6e9055
makes problem
Thanks
Sam
Oh ! The solution : add a DISTINCT in the request... :)
i solved it with this
$emptyUsers = $emptyUsers->join('throttle', 'throttle.user_id', '=', 'users.id') ->where('throttle.banned', '=', $bannedUsers) ->select('users.id', 'users.username', 'users.last_name', 'users.first_name', 'users.email', 'users.permissions', 'users.activated') ->distinct();
when we use this there is another problem exists that is when user is banned he is not listed in users list anyway i will fix it
thanks
Sam
Yeah, there is a problem with the "--" passed in the url. I'm watching it.
okey Thanks
Fix : https://github.com/MrJuliuss/syntara/commit/19a5a5415e819e7dfceef5fc9a331365dc47b2f3
I will release it soon.
Julien
I will update my files
Thanks
Sam
Hi Juliuss,
First of all i thank you for a wonderful script. I am facing a problem in my site . while we do a search from the users list. I get the following error http://gyazo.com/06d26609348ee617d2d0c9eee267b6f4.
to check this you can login to
http://laravel.tech-armada.net/dashboard username : sam@tech-armada.net password : 12345678
it appends a row again. when we do all searches in the users list. but it is not happening in my localhost. So please do reply regarding this issue.
Thanks
Sam