+
+ function hasRight($right)
+ {
+ $profile = Profile::staticGet($this->id);
+ if ($profile) {
+ return $profile->hasright($right);
+ } else {
+ // TRANS: Exception thrown when a right for a non-existing user profile is checked.
+ throw new Exception(_("Missing profile."));
+ }
+ }