DraftModel::updateUser PHP Method

updateUser() public method

Updates a user's draft count.
Since: 2.0.0
public updateUser ( integer $UserID )
$UserID integer Unique ID of the user to be updated.
    public function updateUser($UserID)
    {
        // Retrieve a draft count
        $CountDrafts = $this->getCount($UserID);
        // Update CountDrafts column of user table fot this user
        Gdn::userModel()->setField($UserID, 'CountDrafts', $CountDrafts);
    }