News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Admin editing users profile question.

Started by JaGuR, June 30, 2016, 07:54:01 PM

Previous topic - Next topic

JaGuR

Hi guys, I have a slight dilemma, I am trying to edit certain users profiles, but some options are not available to admin.

For example, I can not view the buddy/ ignore list.

The reason for this is I need to force a couple users to ignore each other, but I can not do this with out going into the database and adding it manually

Is there an array of permissions somewhere in the code that is not allowing me to view buddy ignore lists that I could change so it would allow me to force these two to ignore each other ?

Cheers


Kindred

Not as far as I am aware. What you are trying to f of violates the user's general expectation of privacy, imo...     just like reading user pms
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Siirist

Quote from: JaGuR on June 30, 2016, 07:54:01 PM
. . . The reason for this is I need to force a couple users to ignore each other . . .

You know that as a moderator or above, you can ask those two members to play nice and if they choose not to, you can remove some permissions in order to get them to cooperate.

Just my thoughts,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

JaGuR

Yh, I know,

It is complicated.

On the old platform, I could add them on ignore each others ignore and it worked up until moving to SMF 2.

:(


oOo--STAR--oOo

I think that is a great idea actually.. Maybe a mod could be made to achieve this!

I don't think its invading privacy as you as a moderator/admin are simply removing a permission that allows them to see what a member they are conflicting with is saying..
I'll look into if for you ;)
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

oOo--STAR--oOo

Just for you! to allow admins to edit buddy lists, simply replace these lines of code in these files... This will also allow admins to edit the buddy lists as well!

Sources/Profile.php
Find

'lists' => array(
'label' => $txt['editBuddyIgnoreLists'],
'file' => 'Profile-Modify.php',
'function' => 'editBuddyIgnoreLists',
'enabled' => !empty($modSettings['enable_buddylist']) && $context['user']['is_owner'],
'sc' => 'post',
'subsections' => array(
'buddies' => array($txt['editBuddies']),
'ignore' => array($txt['editIgnoreList']),
),
'permission' => array(
'own' => array('profile_extra_any', 'profile_extra_own'),
'any' => array(),
),
),


Replace

'lists' => array(
'label' => $txt['editBuddyIgnoreLists'],
'file' => 'Profile-Modify.php',
'function' => 'editBuddyIgnoreLists',
'enabled' => $context['user']['is_admin'] || !empty($modSettings['enable_buddylist']) && $context['user']['is_owner'],
'sc' => 'post',
'subsections' => array(
'buddies' => array($txt['editBuddies']),
'ignore' => array($txt['editIgnoreList']),
),
'permission' => array(
'own' => array('profile_extra_any', 'profile_extra_own'),
'any' => array('profile_view_any'),
),
),


Sources/Profile-Modify.php
Find

// Do a quick check to ensure people aren't getting here illegally!
if (!$context['user']['is_owner'] || empty($modSettings['enable_buddylist']))
fatal_lang_error('no_access', false);


Replace

// Do a quick check to ensure people aren't getting here illegally!
if ($context['user']['is_admin']) {

}
elseif (!$context['user']['is_owner'] || empty($modSettings['enable_buddylist']))
fatal_lang_error('no_access', false);



Enjoy!! This will allow admins with permission to give warnings access to edit another users buddy / ignore lists.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

JaGuR

Thanks very much, will give it a try soon.
Cheers

oOo--STAR--oOo

Hold up, I can't edit my post but there is a piece at the bottom I forgot to replace.

replace

'permission' => array(
'own' => array('profile_extra_any', 'profile_extra_own'),
'any' => array(),


With


'permission' => array(
'own' => array('profile_extra_any', 'profile_extra_own'),
'any' => array('issue_warning'),


Sorry about that, this will ensure the user who can access this section has the ability to issue warnings.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

JaGuR

Massive thanks,

This is a very nice way of solving bad blood between members and saving mods a massive headache :)

Should be standard in the SMF platform for mine, would be nice if we could make it so they couldn't take each other off ignore :)

Siirist

Hi,

Just want to say that I believe that it would be awesome if a "higher power" could copy or move this onto the "Tips and Tricks" board so that other members could utilize this solution.

Just My Thoughts,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Steve

I don't agree that should happen. I'm in agreement with Kindred:

QuoteWhat you are trying to f of violates the user's general expectation of privacy, imo...
DO NOT pm me for support!

Siirist

Quote from: Steve on July 05, 2016, 03:51:36 AM
I don't agree that should happen. I'm in agreement with Kindred:

QuoteWhat you are trying to f of violates the user's general expectation of privacy, imo...

Thank you for "waking me up" Steve.  ;) That had escaped me when I posted, and I can very much appreciate that concept. I withdraw my last comment,

Quote from: Siirist on July 04, 2016, 07:43:17 PM
Hi,

Just want to say that I believe that it would be awesome if a "higher power" could copy or move this onto the "Tips and Tricks" board so that other members could utilize this solution.

Just My Thoughts,
Siirist
:-l
and reaffirm my original post

Quote from: Siirist on July 02, 2016, 12:11:14 AM
You know that as a moderator or above, you can ask those two members to play nice and if they choose not to, you can remove some permissions in order to get them to cooperate.
8)

By utilizing this method,
you are giving the members the choice, rather than making the choice for them. *nodding smiley goes here*

Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Advertisement: