$49

Star Ratings

Documentation  •  Changelog

Documentation

Cast a rating on behalf of a specific user

Craft 2

craft()->starRatings_rate->rate($elementId, $key, $rating [, $userId = null])

Craft 3

StarRatings::$plugin->starRatings_rate->rate($elementId, $key, $rating [, $userId = null])

If the `$userId` is omitted, the rating will be cast by the currently logged-in user.