diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index a91ecc3bcb..25f4f04158 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -182,6 +182,7 @@
[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)
[Fix] Add log entry when copying forum permissions.
[Fix] Min/max characters per posts also affects polls option (Bug #47295 - Patch by nickvergessen)
+ [Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)
[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)
[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 324be2b1ed..ca6aae2540 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2793,7 +2793,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
$group_name = get_group_name($group_id);
}
- $log = ($leader) ? 'LOG_MODS_ADDED' : 'LOG_USERS_ADDED';
+ $log = ($leader) ? 'LOG_MODS_ADDED' : (($pending) ? 'LOG_USERS_PENDING' : 'LOG_USERS_ADDED');
add_log('admin', $log, $group_name, implode(', ', $username_ary));
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 7225d3114f..9a9b89652a 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -570,8 +570,9 @@ $lang = array_merge($lang, array(
'LOG_GROUP_REMOVE' => 'Members removed from usergroup %1$s
» %2$s',
'LOG_GROUP_UPDATED' => 'Usergroup details updated
» %s',
'LOG_MODS_ADDED' => 'Added new leaders to usergroup %1$s
» %2$s',
- 'LOG_USERS_APPROVED' => 'Users approved in usergroup %1$s
» %2$s',
'LOG_USERS_ADDED' => 'Added new members to usergroup %1$s
» %2$s',
+ 'LOG_USERS_APPROVED' => 'Users approved in usergroup %1$s
» %2$s',
+ 'LOG_USERS_PENDING' => 'Users requested to join group “%1$s” and need to be approved
» %2$s',
'LOG_IMAGESET_ADD_DB' => 'Added new imageset to database
» %s',
'LOG_IMAGESET_ADD_FS' => 'Add new imageset on filesystem
» %s',