Index: trunk/phase3/includes/User.php |
— | — | @@ -2018,11 +2018,11 @@ |
2019 | 2019 | |
2020 | 2020 | |
2021 | 2021 | /** |
2022 | | - * Checks if a user with the given name exists, returns the ID |
| 2022 | + * Checks if a user with the given name exists, returns the ID. |
2023 | 2023 | */ |
2024 | 2024 | function idForName() { |
2025 | 2025 | $s = trim( $this->getName() ); |
2026 | | - if ( 0 == strcmp( '', $s ) ) return 0; |
| 2026 | + if ( $s === '' ) return 0; |
2027 | 2027 | |
2028 | 2028 | $dbr = wfGetDB( DB_SLAVE ); |
2029 | 2029 | $id = $dbr->selectField( 'user', 'user_id', array( 'user_name' => $s ), __METHOD__ ); |