Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 18, 20232 yr Hi Guys. On many websites, when registering an account, there are only two fields, e-mail address and password. The username is set based on the email address, usually in its entirety or set based on what comes before the @ symbol e.g. emial: olivia.johnson@coldmail.com Username: Olivia.johnson My primitive working code looks like this: $GetNameEmail = substr($values['email_address'], 0, strrpos($values['email_address'], '@')); $member->name = ucfirst($GetNameEmail); I need to check if username is already in the database. How can I achieve it? Something like when registering via the social media method where if the nick is taken, we have to enter a different one.