function __rate_user($fromid, $toid, $score, $comment, $reason) { $rating = new UserRating(); $rating->user_from = $fromid; $rating->user_to = $toid; $rating->score = $score; $rating->comment = $comment; $rating->reason = $reason; $rating->save(); }