1

I am using Joomla 2.5 user registration form. After successful User registration user will get activation mail and his status in admin back end is inactive and blocked .

And i have made one changes that After successful registration user status in back end is enabled .

code is : registration.php

// Check if the user needs to activate their account.
    if (($useractivation == 1) || ($useractivation == 2)) {
        $data['activation'] = JApplication::getHash(JUserHelper::genRandomPassword());
        $data['block'] = 0;//0-enable 1-block
    }

After this changes user state is enabled rather than blocked After successful registration . and he can activate his accountand login all so . but the problem is after activating his account all so his status is showing not activate in admin back end . what is the solution for this .?

  • Have you made core code changes to the registration.php file or is this an issue you're experiencing with the default Joomla functionality? Also, are you using any 3rd party extensions for the registration? – Lodder Jan 24 '15 at 9:38
2
$db->setQuery(
        'SELECT '.$db->quoteName('id').' FROM '.$db->quoteName('#__users') .
        ' WHERE '.$db->quoteName('activation').' = '.$db->Quote($token) .
        ' AND '.$db->quoteName('block').' = 0' .
        ' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())
    );`

You need to change block= 0 here in registration.php

  • 1
    Please be sure to use the latest coding standards for database queries. Your code is the older method. – Lodder Jan 24 '15 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.