28efd7619bec67a7761cd3fd7aa0ef34f4b15086
3 namespace wcf\data\user\follow
;
5 use wcf\data\DatabaseObject
;
9 * Represents a user's follower.
11 * @author Alexander Ebert
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 * @property-read int $followID unique id of the following relation
16 * @property-read int $userID id of the following user
17 * @property-read int $followUserID id of the followed user
18 * @property-read int $time time at which following relation has been established
20 class UserFollow
extends DatabaseObject
23 * Retrieves a follower.
26 * @param int $followUserID
29 public static function getFollow($userID, $followUserID)
31 $sql = "SELECT followID
32 FROM wcf" . WCF_N
. "_user_follow
34 AND followUserID = ?";
35 $statement = WCF
::getDB()->prepareStatement($sql);
41 $row = $statement->fetchArray();
46 return new self(null, $row);