Jūs esate

ELGG. Howto disable email verification

Last Friday I was working with the ELGG framework. I registered a user. Then the confirmation email was sent to the user, saying "press on the link below to confirm your email account". Unfortunately I didn't want to have that email. So, the question is: How to disable the email validation? The answer is very simple, just three lines of code:
$user = get_user_by_username($username_as_string); $user->enable(); set_user_validation_status($user->getGUID(), true);
After those three lines of code - the user is automatically validated :) Keep in mind: it's not secure to do like that :) So, if you know what you're doing - do it ;)

Komentuoti