From 71c25a126d15a53d2f6155eb017ed4db953c50ed Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 30 Sep 2011 17:31:36 +0000 Subject: [PATCH] Made addNewUserLogEntry() return the ID of the new log entry to be more useful --- includes/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/User.php b/includes/User.php index b96128558b..ef724c4d2d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3913,7 +3913,7 @@ class User { * @param $byEmail Boolean: account made by email? * @param $reason String: user supplied reason * - * @return true + * @return int|bool True if not $wgNewUserLog; otherwise ID of log item or 0 on failure */ public function addNewUserLogEntry( $byEmail = false, $reason = '' ) { global $wgUser, $wgContLang, $wgNewUserLog; @@ -3935,13 +3935,12 @@ class User { } } $log = new LogPage( 'newusers' ); - $log->addEntry( + return (int)$log->addEntry( $action, $this->getUserPage(), $reason, array( $this->getId() ) ); - return true; } /** -- 2.20.1