diff --git a/src/Auth/User.php b/src/Auth/User.php index 01cdb0bd84..9390a4c1cd 100644 --- a/src/Auth/User.php +++ b/src/Auth/User.php @@ -105,16 +105,28 @@ public function isTaxonomizable() public function editUrl() { - return cp_route('users.edit', $this->id()); + if (! $id = $this->id()) { + return null; + } + + return cp_route('users.edit', $id); } public function updateUrl() { - return cp_route('users.update', $this->id()); + if (! $id = $this->id()) { + return null; + } + + return cp_route('users.update', $id); } public function apiUrl() { + if (! $id = $this->id()) { + return null; + } + return Statamic::apiRoute('users.show', $this->id()); }