Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Bug - administrator email is sent when self registration is assigned

10 years 8 months ago
Licenses:
JomSocial Active Socialize Expired

ISSUE SUMMARY:
When there are no fields in the profile and no profile types or multiprofile enabled, the administrator approval email gets sent when com_users configuration is set to self register.

This happens in controllers/register.php when register_save() is called after the initial register screen is set.

if the following code is true

if (count($fields) <= 0 && (!$profileTypes || !$config->get('profile_multiprofile')))

it will send the 'registration' email by calling $this->sendEmail()

inside sendEmail() the following switch occurs:
            case 'registration' :

                // This section will only be called when there are no custom fields created and we just proceed like how Joomla
                // registers a user.
                if ($requireApproval || $com_user_activation_type == 1) {
                    $message = JText::sprintf(
                        'COM_COMMUNITY_EMAIL_REGISTRATION_REQUIRES_ACTIVATION',
                        $name,
                        $sitename,
                        $activationURL,
                        $siteURL,
                        $username,
                        $password
                    );

$com_user_activation_type ==1 is actually self register, not admin approve.

You can verify by making sure the com_users optinos are set to self register and verify this value. The fix is to simply make this test a $com_user_activation_type == 2.

10 years 8 months ago
Licenses:
JomSocial Active Socialize Expired

Another similar bug is found where the COM_COMMUNITY_EMAIL_REGISTRATION_COMPLETED_REQUIRES_ACTIVATION
email is sent even if the user has been approved, invited (via invitex), or if the activation in com_users is set to "none".

            case 'registration_complete' :

                if ($requireApproval || $com_user_activation_type == 2) {
                    // if approval is required, send an email to both admin and user, admin - to activate the user, user - to wait for admin approval

                    /* @since 4.1, there is a new requirement to send the activation to user to make sure the email is valid first before letting admin verify the account
                     *
                     * so we will make the user activate first but still in disabled state
                     *
                     * */

                    $activationURL = $baseUrl . 'index.php?option=' . COM_COMMUNITY_NAME . '&view=register&task=verifyemail&' . ACTIVATION_KEYNAME . '=' . $user->get(
                            'activation'
                        );
                    $message = JText::sprintf(
                        'COM_COMMUNITY_EMAIL_REGISTRATION_COMPLETED_REQUIRES_ADMIN_ACTIVATION',
                        $name,
                        $sitename,
                        $activationURL
                    );
                } else {
                    $message = JText::sprintf(
                        'COM_COMMUNITY_EMAIL_REGISTRATION_COMPLETED_REQUIRES_ACTIVATION',
                        $name,
                        $sitename,
                        $activationURL,
                        $siteURL
                    );
                }

                break;

This needs to have a condition if $com_user_activation_type ==0 which sends out the following (from en-GB.com_community.ini)
COM_COMMUNITY_EMAIL_REGISTRATION_COMPLETED="Hello %s,\n\nThank you for registering at %s.\n\nYou may now log in to %s using your username and password."

10 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Devon,

Thank you, I will report this issue to our developer

cheers!

10 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Devon,

Before i inspect this issue further. can you update your jomsocial to the latest version , please? and let me know if this issue still happens.

thank you

10 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Devon,

After you upgrade the jomsocial please you download my file www.dropbox.com/s/wm93f4273zfb1b2/register.php.zip?dl=0 and copy to /components/com_community/controllers/

and modify this file language/en-GB/en-GB.com_community.ini, find this code :

COM_COMMUNITY_EMAIL_REGISTRATION_REQUIRES_ACTIVATION="Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can log in.\nTo activate the account, click on the following link or copy-&amp;-paste it in your browser:\n\t<a href=_QQQ_%3$s_QQQ_>%3$s</a>\n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s"

and replace to :
COM_COMMUNITY_EMAIL_REGISTRATION_REQUIRES_ACTIVATION="Hello %1$s,\n\nThank you for registering at %2$s. Your account is created and must be activated before you can log in.\nTo activate the account, click on the following link or copy-&amp;-paste it in your browser:\n\t<a href=_QQQ_%3$s_QQQ_>%3$s</a>\n\nAfter activation you may login to %4$s using the following username and password:\n\nUsername: %5$s\nPassword: %6$s"

thank you!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW