As an administrator, how can I change a user email address ?
هناك العديد من الموضوعات التي تناقش هذا الأمر. يمكنك زيارة صفحة ملف المستخدم وتعديلها، لكنهم سيظلون بحاجة إلى التحقق من عنوانهم، وهو ما يُعدّ دائمًا فكرة جيدة تقريبًا.
إذا أردت أن تتولى الأمر بنفسك، فيمكنك فعل ذلك من خلال وحدة تحكم Rails. إنها أكثر أمانًا من استعلامات قاعدة البيانات المباشرة.
قد يعمل هذا:
u=User.find_by_username("pat")
UserEmail.find_by(user_id: u.id).first.update (email: "pat@gmail.com")
I can not use the console has we are hosted on trydiscourse.com.
What do you mean by visiting ? If I go to the user page as an administrator, I can edit username and name for example but not the email.
Scroll down to bottom then you will see an impersonation button if your as an admin
Yes indeed, it’s how I do it now. But after impersonation, I need to logout to go back to my administrator account. I hoped there was a better way.
Seems no possible for now
Oh. The email isn’t verified yet? So they aren’t really even a user. I think I’d just delete the account and have them try again.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
