diff options
Diffstat (limited to 'Digitigrade/Model/Actor.php')
| -rw-r--r-- | Digitigrade/Model/Actor.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php index 5974f40..2d5eba7 100644 --- a/Digitigrade/Model/Actor.php +++ b/Digitigrade/Model/Actor.php @@ -34,6 +34,9 @@ class Actor extends PushableModel { bool $automated = false, bool $requestToFollow = true // setting this true by default as i think it's better for privacy ): self { + if (self::findLocalByHandle($handle) != null) { + throw new \RuntimeException('an actor with that local handle already exists!'); + } $actor = new self(); $actor->uri = path_to_uri("/user/$handle"); $actor->isLocal = true; |
