Restrict Access to User Profile Page

This board for support questions on Joomla 1.6 RC (= Release Candidate - which should NOT be used on a production server) is NO longer active because Joomla 1.6.0 has been released.

>> For Joomla! 1.6 Support Questions, please use http://forum.joomla.org/viewforum.php?f=614 instead <<
Locked
zdraper
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Thu Oct 14, 2010 6:38 pm
Location: Reno, NV
Contact:

Restrict Access to User Profile Page

Post by zdraper » Mon Oct 18, 2010 4:41 pm

Hello Guys,

So I am developing a website in Joomla 1.6 that will launch sometime next year after Joomla 1.6 is out of beta. The website has three general groups of people that will be using it, the public, grantees, and consultants. Both the grantee and consultant potions of the website are protected by a login form.

The grantees will all use the same username and password which will be changed regularly and be redistributed to them. For this purpose, I need to block the grantee user from being able to change the password or edit the user profile (as by doing so they could block other grantees from accessing the website). In fact, I would like to block their access from even viewing the user profile.

The consultants will have custom login credentials and will have detailed user profiles. I need the consultants to be able to edit their own profile as well as change their own password.

Any ideas on how this could be accomplished?

I am using the built in User - Joomla! and User - Profile plugins. I have set the access level on the User - Profile plugin to Consultant which keeps the Grantees from being able to see the extended profile fields, but I cannot seem to prevent the grantees from editing the basic profile, including their password.

Any help would be greatly appreciated.

 
User avatar
DC_Navan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 217
Joined: Thu Feb 10, 2011 4:05 pm

Re: Restrict Access to User Profile Page

Post by DC_Navan » Tue Feb 22, 2011 4:54 pm

Did you ever get this to work mate?

Im looking to do a very similar thing to you, as in I do not want users being able to edit their password manually.

Many Thanks,

Cormac ???

zdraper
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Thu Oct 14, 2010 6:38 pm
Location: Reno, NV
Contact:

Re: Restrict Access to User Profile Page

Post by zdraper » Tue Feb 22, 2011 5:08 pm

Hi DC,

No not really. I have put this portion of the project on hold while I work on other things.

When I was exploring this I found an entry in the Joomla! Issue Tracker in which the bug reporter requested that this functionality be added to Joomla! 1.6, but he was told that the issue was too much for the developers to take on at this time and his request was closed as being "not a bug."

At the bottom of this Issue Tracker entry, Elin suggested the following (which I have not yet tried):
You can simply make an override for the profile layout either a blank page or
have it redirect elsewhere.
You can view the issue in the Issue Tracker here: http://joomlacode.org/gf/project/joomla ... m_id=23641

The biggest problem with Elin's suggestion in my case is that I need certain users to be able to edit their profile while other users cannot (this is controlled by user groups.) While not as clear cut as she suggested, in my case with a little bit of a work around I should be able to make it work.

Good luck, let me know how it turns out!

User avatar
DC_Navan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 217
Joined: Thu Feb 10, 2011 4:05 pm

Re: Restrict Access to User Profile Page

Post by DC_Navan » Tue Feb 22, 2011 5:32 pm

Hi Zachary!

thanks for the quick reply!

That link was most useful and informative. I think as this issue is only a minor problem for me (as im using LDAP passwords) I shall put it down the list of things to do and wait for joomla 1.7 to come out in june/july which will hopefully include this as standard.


If I ever come across a fix in the months to come, i'll of course write it here for you.

All the best,

Cormac :pop

User avatar
DC_Navan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 217
Joined: Thu Feb 10, 2011 4:05 pm

Re: Restrict Access to User Profile Page

Post by DC_Navan » Thu Feb 24, 2011 4:37 pm

Ive done it!!! :D


While trying to fix a completely different problem (not being able to edit articles via frontend) I came across this line of code: COM_USERS_Edit_Profile

It looked interesting so I searched for all files containing it and found a file in:
/var/www/joomla/templates/braincode-grunge/html/com_users/profile

which I then commented out this bit:

<?php if (JFactory::getUser()->id == $this->data->id) : ?>
<a href="<?php //echo JRoute::_('index.php?option=com_users&task=profile.edit&user_id='.(int) $this->data->id);?>">
<?php //echo JText::_('COM_USERS_Edit_Profile'); ?></a>
<?php endif; ?>

and now a user cannot edit their profile as the link is'nt there! 8)

Delighted!

now if only I could allow registered users to edit articles again.... Hmmmmm! :(

 

Locked

Return to “Joomla! 1.6 RC Support [closed]”