Fix unexpected return type of User::idFromName()
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 3 Dec 2018 13:33:48 +0000 (14:33 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 3 Dec 2018 13:33:48 +0000 (14:33 +0100)
commita50014d259ff9f045ed4ae2ae56ed9e211b85ba1
tree3b7be52262dd978890ad15cee35c9ee5e00778b7
parentd7fba6c62decdcbd108cdd26b49a9075377e6368
Fix unexpected return type of User::idFromName()

The user_id is an unsigned integer in the database. But not all database
abstractions we use are guaranteed to return integer values as PHP
integers. Sometimes it's a string and needs an integer cast first.

Want proof? Search for usages of this method. Almost all add an (int)
cast. This is weird and should not be necessary.

Change-Id: If1d706f73350fca5b3a0f1e0de59e4518162445b
includes/user/User.php