- $ufp = new User_flag_profile();
-
- $ufp->profile_id = $this->profile->id;
- $ufp->user_id = $user->id;
- $ufp->created = common_sql_now();
-
- if (!$ufp->insert()) {
- throw new ServerException(sprintf(_("Couldn't flag profile '%s' for review."),
- $this->profile->nickname));
- }