Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2854 Tampilan

I want to find user by user's email. And here is my code but i get no result from it.

user = request.env["res.users"].search([('login', 'ilike', email)])
Avatar
Buang
Jawaban Terbai

Hello,

You will try this

user = request.env["res.users"].search([('login', '=', email)])

Thank you,
Avatar
Buang
Penulis Jawaban Terbai

thanks for your reply, i have already tried your solution but it's not giving me any user.

Avatar
Buang

hello

just use email.encode('utf-8') instead of email here [('login','=',email)] , as the email have some special character in your case.

Post Terkait Replies Tampilan Aktivitas
1
Jul 25
386
Search a message Diselesaikan
1
Feb 25
1205
0
Sep 23
2147
2
Jun 23
3901
1
Agu 22
12678