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.
Run all pending migrations from the HumHub root directory:
php yii migrate --migrationPath=@humhub/modules/reputation/migrations
After any migration that adds a new scoring column, run a full recalculation to populate it for existing users:
php yii reputation/recalculate
friends_count column (corrected)Version 1.1.3 documented a friends_count column, but the value was stored as a virtual PHP property only and was never persisted. Version 1.1.5 delivers the correct migration via m260403_000003_add_friends_count.
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`;
After applying this migration, run
php yii reputation/recalculateto populatefriends_countfor all existing users.
friends_count column (superseded by v1.1.5)The v1.1.3 release notes referenced this column. No separate migration was shipped for that release — the fix is delivered by the v1.1.5 migration above.
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 alongside all six tracked metrics: Content, Likes, Comments, Followers, and Friends. Prints a summary of total processed, updated, and any errors at the end.
Run this after changing point values, exclusion settings, or applying a new migration to apply changes to all 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
Clears the following keys if present: leaderboardLimit, pointsPerContent, pointsPerLike, pointsPerComment, followersCount, pointsPerFriend, enableReputationLevels, showOnProfile, enableHistory, historyRetentionDays. Only reputation-related settings are affected — nothing else is touched.
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.
php yii reputation/show-config
The friendship scoring row shows one of three contextual statuses:
pointsPerFriend > 0If admin panel settings are detected, a warning is shown explaining which keys are present and how to clear them with reset-settings.
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, and compares everything against the stored reputation record.
php yii reputation/check-user 1
Replace 1 with the numeric user ID.
The friendship section at the end of the output shows one of three states:
pointsPerFriend is 0friends_count differs from the live countIf any stored count differs from the live count, the command will prompt 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.