Jump to content

Cannot change own avatar if member can't see profiles


teraßyte
 Share

Recommended Posts

So there is no account setting editing now, it's all frontend by clicking photo I guess. And a member could be locked out of changing or removing his/her pic if the group view setting changes, and not even know it is there. Would be a real issue if the pic was offensive, political, seasonal, etc. Is this correct? There has to be a way.

Possibly if they are in a group that doesn't see, it hides theirs. Or add a way to see and delete.

Edited by chilihead
Link to comment
Share on other sites

Yep, not really the best thing. There should be a way to still edit your photo even if you can't access your profile. I know some sites have the profiles disabled for everyone, in that situation the members can't change anymore the photo/avatar that shows up in the content they post.

Link to comment
Share on other sites

I can see the logic in this both ways.

As profiles are in effect part of the member account itself, then disabling access to profiles removes that ability.

Having said that I would like the ability to allow members who cannot view profiles to be able to change their picture, although something tells me its not quite as simple to do that as it sounds...

Link to comment
Share on other sites

4 minutes ago, teraßyte said:

Yep, not really the best thing. There should be a way to still edit your photo even if you can't access your profile. I know some sites have the profiles disabled for everyone, in that situation the members can't change anymore the photo/avatar that shows up in the content they post.

So they see it in their own posts but can't remove it? Yeah, that should be fixed. 

Link to comment
Share on other sites

I was thinking about this a bit more. How about (just a random idea) to gain access to change it they simply view it in a topic / comment etc and hover over it to bring up the 'card' and then they can change it from there ?

I was thinking this kind of thing: , sorry for not a good pic I do not have any decent editing tools on the machine I'm using as I type this:

hover_change.thumb.png.134b5f0a2f735b6f6

When viewing your *own* card you have a link to change it (where I have a red line) with something like "Change my photo"

I thought about having to click the pic in the hover itself but that's counter intuitive as its too many complex steps and not obvious...

Edited by AndyF
Added more info
Link to comment
Share on other sites

I personally solved this by writing the following code as a hook to extend \IPS\Member in a properitary application I've created: 

class tekcode_hook_tekMemberExtend extends _HOOK_CLASS_
{
	public $tekYourProfileBypass = false;

	public function canAccessModule( $module )
	{
		$response = parent::canAccessModule( $module );

		/* We only wish to interfer further if the above check does not return true */
		if ( $response )
		{
			return $response;
		}

		/* If the id parameter is not set or the id parameter does not equal the logged in user, we return false */
		if ( ! isset( \IPS\Request::i()->id ) or $this->member_id !== intval( \IPS\Request::i()->id ) )
		{
			return $response;
		}

		/* Only alter the response if it's the profile view */
		if ( $module->application === 'core' and 
			$module->key === 'members' and 
			\IPS\Dispatcher::i()->controller === 'profile' )
		{
			$this->tekYourProfileBypass = true;
			return true;
		}

		return $response;
	}
}

And then I manually added some links back into the user menu template. 

(And I also added a message as a theme hook to be displayed on the profile view to the user when they display their own profile, to tell them it's only open to themselves. When tekYourProfileBypass equals true.)

Edited by TSP
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...