Disable and redirect Joomla "User Profile" page

Previously, in this article, I explained how to redirect users after registration to any page on your website thus avoiding User Profile page after they login for the first time.

If New User Account Activation is set to None (activation not required) this is all you need to avoid User Profile page. However, if Account Activation is set to Self (activation via an email link) this is not enough. When users click on a link in the activation email, they are taken to a login form and if they use it to login, they get to the User Profile page.

There may be other ways to prevent this, and if you know a better one, let me know, but this is how I solved it:

Open file components/com_users/views/profile/tmpl/default.php

This is how it looks:

View source
  1. <?php
  2. /**
  3. * @package           Joomla.Site
  4. * @subpackage        com_users
  5. * @copyright         Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  6. * @license           GNU General Public License version 2 or later; see LICENSE.txt
  7. * @since             1.6
  8. */
  9.  
  10. defined('_JEXEC') or die;
  11. JHtml::_('behavior.tooltip');
  12. ?>
  13. <div class="profile<?php echo $this->pageclass_sfx?>">
  14. <?php if ($this->params->get('show_page_heading')) : ?>
  15. <h1>
  16.      <?php echo $this->escape($this->params->get('page_heading')); ?>
  17. </h1>
  18. <?php endif; ?>
  19.  
  20. <?php echo $this->loadTemplate('core'); ?>
  21.  
  22. <?php echo $this->loadTemplate('params'); ?>
  23.  
  24. <?php echo $this->loadTemplate('custom'); ?>
  25.  
  26. <?php if (JFactory::getUser()->id == $this->data->id) : ?>
  27. <a href="<?php echo JRoute::_('index.php?option=com_users&task=profile.edit&user_id='.(int) $this->data->id);?>">
  28.       <?php echo JText::_('COM_USERS_Edit_Profile'); ?></a>
  29. <?php endif; ?>
  30. </div>

Remove plain text passwords from Joomla registration emails

Joomla CMS sends registration welcome emails with plain text passwords, which is not a great security practice.

To prevent this you can modify language file:
language/en-GB/en-GB.com_users.ini

Depending on your Joomla installation language en-GB bit may be different for you.

We are interested in two entries:
COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY
COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY

This is full text:

COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY="Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can use it.\nTo activate the account click on the following link or copy-paste it in your browser:\n%s \n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s"

COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY="Hello %s,\n\nThank you for registering at %s. Your account is created and must be verified before you can use it.\nTo verify the account click on the following link or copy-paste it in your browser:\n %s \n\nAfter verification an administrator will be notified to activate your account. You'll receive a confirmation when it's done.\nOnce that account has been activated you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s"

Modify or remove "Powered by Kunena Forum" credit links

Kunena forum by default adds "Powered by Kunena Forum" credit link in the footer of every forum's page.

credit link "Powered by Kunena Forum"

While this is a fair way to say "thank you" to developers for their hard work (and Kunena team specifically asks not to remove their credit link) you may have valid reasons why you choose to edit or completely remove it. GPL license does not prohibit removal of the visible backlinks.

Powered by Kunena Forum text is inserted by code in following file:
administrator/components/com_kunena/libraries/view.php

Joomla - JUser: :_load: Unable to loauser with ID: 62

Issue occurred after migrating website from Joomla 1.5 to 2.5 (using SP Upgrade). When admin user was logged-on in the front end, on some pages following error was displayed:

JUser: :_load: Unable to load user with ID: 62

Problem was caused by checked-out articles. As users were not migrated using SP Upgrade (website had only one user) checked out articles were marked as being checked out by super administrator from old 1.5 website (UserID 62), which didn't exist on the new Joomla installation.

Solution was to unlock all locked (checked out) articles. This can be done either manually in the back end, or if you have lots of articles, running following SQL statement against Joomla database (using phpMyAdmin or similar):

View source
UPDATE 'uytox_content'
SET checked_out = 0
WHERE checked_out = 62
 

Where:
uytox_ Joomla DB table prefix.
62 - old Joomla 1.5 website user ID



Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait
Privacy Policy