Docly Child

Administration

Estimated reading: 4 minutes 509 views

Administration

As an administrator, you gain full control over how points are managed, displayed or even what they are called. You can name and re-name points at any time and myCred even supports white-labeling which allows you to replace the “myCred” name with your own.

 

When it comes to points management, administrators add/remove points from users along with editing or removing log entries.

 

myCred supports up to two types of users to manage points:

 

– Point Editors

Point Editors can edit balances and view/export log entries. So if you have a dedicated role set up in your WordPress installation that can manage users but not settings, you can assign them to also be point editors. Point editors, however, can not change any plugin-related settings e.g. which hooks to use and how many points to give.

 

– Point Administrators

Just like the WordPress administrator role, Point Administrators have full access to all myCred features.

Figure 1. Capabilities based on admin type.

Task Point Editor Point Admin
View Log
View Users History
Adjust Balance with log entry
Edit Log Entry
Adjust Balance without log entry
Manage Hooks
Manage Add-ons
Manage Settings

When “Point Editors” adjusts a user’s balance, myCred will require that they enter a log entry with the adjustment. Administrators however can adjust a user’s balance without a log entry.

Capabilities

“Point Editors” and “Point Administrators” are identified using capabilities and not roles. This way, you can create custom roles and still have access to myCred features.

 

By default, “Point Editors” are identified via the export capability while “Point Administrators” are identified using the manage_options capability. It is imperative that you keep this in mind when you adjust your roles and capabilities in WordPress or you run the risk of locking yourself out of myCred.

 

If you for example choose to disable the export capability in order to disable WordPress exports, you will need to make sure you set a different capability in myCred to identify “Point Editors”.

Figure 2. In case you lock yourself out of your myCred settings after changing the capability settings, you can use the code snippet below to allow your account to access the settings again. Remember to remove it once you have corrected your myCred security settings.

				
					/**
 * Allow Admin Override
 * @since 1.0
 * @version 1.0
 */
add_filter( 'mycred_can_edit_plugin', 'mycredpro_allow_admin_override' );
function mycredpro_allow_admin_override( $result ) {

	if ( $result === true ) return $result;

	$admin_user_id = 1;
	if ( get_current_user_id() == $admin_user_id )
		return true;

	return $result;

}
				
			

Viewing Balances

There are two ways you can see a particular users balance in the wp-admin area:

  1. You can see the balance(s) when editing a user.
  2. On the Users page in your admin area. Here myCred adds in each point type as a column in your list.

myCred will show each point type balance you have installed when you edit their account.

Leave a Comment

Share this Doc
CONTENTS