- function validateUrl() {
- return is_null($this->url) ||
- Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
- }
+ 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."));
+ }
+ }