gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
178 stars 134 forks source link

Student email notifications use student username instead of email address #2755

Closed brianhogg closed 1 week ago

brianhogg commented 1 week ago

Reproduction Steps

  1. Register a new student and check your email, when there are no Username form fields

Expected Behavior

Welcome email contains email address beside "Your Login:"

Actual Behavior

Email contains username, which appears to be the first part of the email address.

This issue has be recreated:

brianhogg commented 1 week ago

The notification class is using a now deprecated lifterlms_registration_generate_username option, instead of the LLMS_Forms::instance()->are_usernames_enabled() method that things like "Lost password?" use to decide whether to ask for email address or username. If we just switch to using that flag instead it'll at least work the same as the Lost Password form.