From 694873e7224bda0690a5e77df24e0d3972096441 Mon Sep 17 00:00:00 2001 From: Roland Becker Date: Mon, 22 Aug 2016 20:56:52 +0200 Subject: [PATCH] Cache latest data in function user_cache_database_result The functions did not return a value in all cases. There is no place in code where the return value of the function is used. The cache was not updated with latest data if's been set before. Fixes #20551 --- core/user_api.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/user_api.php b/core/user_api.php index 10f4312faf..7edb5d682c 100644 --- a/core/user_api.php +++ b/core/user_api.php @@ -130,17 +130,13 @@ function user_cache_array_rows( array $p_user_id_array ) { } /** - * Cache an object as a bug. + * Cache a user row * @param array $p_user_database_result A user row to cache. - * @return array|null + * @return void */ function user_cache_database_result( array $p_user_database_result ) { global $g_cache_user; - if( isset( $g_cache_user[$p_user_database_result['id']] ) ) { - return $g_cache_user[$p_user_database_result['id']]; - } - $g_cache_user[$p_user_database_result['id']] = $p_user_database_result; }