common.php ConfigurationModule settings can be configured directly in /protected/config/common.php under the modules key. Settings defined here take priority over the admin panel — if a property is set in common.php, the admin panel cannot override it.
'modules' => [
'reputation' => [
'class' => 'humhub\modules\reputation\Module',
// Leaderboard settings
'leaderboardLimit' => 5,
'pointsPerContent' => 1,
'pointsPerLike' => 1,
'pointsPerComment' => 1,
'followersCount' => 5,
'pointsPerFriend' => 3, // Requires Friendship module; 0 = disabled
'enableHistory' => false,
'showOnProfile' => true,
'enableReputationLevels' => true,
// Exclude system-generated content from reputation
'excludedContentTypes' => [
'humhub\modules\activity\models\Activity',
'humhub\modules\notification\models\Notification',
// Add more content types to exclude here if needed
],
'reputationLevels' => [
'Newcomer' => 0,
'Member' => 1000,
'Regular' => 3000,
'Veteran' => 6000,
'Expert' => 10000,
'Legend' => 20000,
],
],
],
| Option | Type | Default | Description |
|---|---|---|---|
leaderboardLimit | int | 10 | Number of users shown in the dashboard leaderboard widget |
pointsPerContent | int | 1 | Points awarded per piece of content created |
pointsPerLike | int | 2 | Points awarded per like received |
pointsPerComment | int | 3 | Points awarded per comment received |
followersCount | int | 5 | Points awarded per follow received |
pointsPerFriend | int | 0 | Points awarded per mutual friendship (requires Friendship module; 0 = disabled) |
enableHistory | bool | true | Track a history log of reputation changes |
showOnProfile | bool | true | Show the reputation panel on user profile pages |
enableReputationLevels | bool | true | Enable the reputation level/badge system |
historyRetentionDays | int | 365 | Days to keep history records (0 = forever) |
excludedContentTypes | array | [] | Additional content type classes to exclude from scoring |
reputationLevels | array | See below | Level names and their minimum point thresholds |
Reputation levels are defined as an associative array of 'Label' => minimumPoints pairs in ascending point order:
'reputationLevels' => [
'Newcomer' => 0,
'Member' => 1000,
'Regular' => 3000,
'Veteran' => 6000,
'Expert' => 10000,
'Legend' => 20000,
],
⚠ Important — Level names are hardcoded and cannot be translated. The label strings defined here (e.g.
'Newcomer','Legend') are stored and displayed as-is throughout the module — in profile panels, leaderboards, and badges. They are not passed through HumHub's translation system, so changing the language in HumHub will not affect them. If you need localised level names, define them directly in this array in your desired language.
By default the module always excludes the following types from all reputation calculations, regardless of configuration:
humhub\modules\activity\models\Activityhumhub\modules\notification\models\Notificationhumhub\modules\comment\models\Commenthumhub\modules\like\models\LikeAny types listed in excludedContentTypes in common.php are merged on top of these. There is no need to re-list the defaults above — they are always excluded automatically.
When HumHub's Friendship module is installed and enabled, you can award points for mutual friendships by setting pointsPerFriend to a positive integer. The module counts each accepted friendship once (using user_friendship.user_id = $userId), so the score reflects the number of distinct friends a user has.
Setting pointsPerFriend to 0 (the default) disables friendship scoring entirely, even if the Friendship module is installed. The field is hidden in the admin panel when the Friendship module is not present.
'pointsPerFriend' => 3, // Award 3 points per mutual friend
After enabling or changing
pointsPerFriend, runphp yii reputation/recalculateto apply the new value to all existing users.
friends_count columnVersion 1.1.3 adds a friends_count column to the reputation_user_reputation table. Run the module migration to apply it before upgrading:
php yii migrate --migrationPath=@humhub/modules/reputation/migrations
If the migration runner is not available, apply it manually:
ALTER TABLE `reputation_user_reputation`
ADD COLUMN `friends_count` INT NOT NULL DEFAULT 0
AFTER `followers_count`;
Console commands are available for maintenance, debugging, and bulk operations. Run them from your HumHub root directory.
reputation/recalculateRecalculates reputation scores for all enabled users.
php yii reputation/recalculate
Outputs a line per user showing their updated score, content count, likes, comments, followers, and friends. Prints a summary of total processed, updated, and any errors at the end.
Run this after changing point values or exclusion settings to apply them to existing scores.
reputation/statsDisplays a quick overview of reputation data across all users.
php yii reputation/stats
Shows total users with a reputation record, the average score, and the highest score.
reputation/reset-settingsClears all admin panel reputation settings from the database, forcing the module to fall back to common.php configuration.
php yii reputation/reset-settings
Useful if conflicting admin panel settings are interfering with your common.php values. Only deletes reputation-related settings — nothing else is affected.
reputation/full-resetRuns reset-settings followed immediately by recalculate in a single command.
php yii reputation/full-reset
Use this when you want to wipe admin panel overrides and immediately resync all scores against the current common.php configuration.
reputation/show-configDisplays the currently active module configuration, including all point values, feature flags, reputation levels, excluded content types, and whether any admin panel settings are present in the database. Also shows the friendship scoring status (active / disabled / module not installed).
php yii reputation/show-config
If admin panel settings are detected, a warning is shown explaining which common.php properties will take precedence and how to clear them.
reputation/check-user [userId]Diagnostic command for a single user. Shows all of their content records with per-record details (type, state, archived flag, whether excluded), the live calculated content count after all filters, friendship scoring status and live friend count, and compares everything against the stored reputation record.
php yii reputation/check-user 1
Replace 1 with the numeric user ID. If the stored count differs from the live count, the command will tell you to run recalculate.
Use this when a user's reputation score looks incorrect and you need to understand exactly what is and isn't being counted for them.