Fix short addr collision

This commit is contained in:
Jill Stingray 2020-06-11 12:54:20 +03:00
parent fe13bbfdb8
commit 095b7960ca
2 changed files with 7 additions and 1 deletions

View file

@ -137,6 +137,12 @@ class Club extends RowModel
return false; return false;
if(in_array($code, OPENVK_ROOT_CONF["openvk"]["preferences"]["shortcodes"]["forbiddenNames"])) if(in_array($code, OPENVK_ROOT_CONF["openvk"]["preferences"]["shortcodes"]["forbiddenNames"]))
return false; return false;
if(\Chandler\MVC\Routing\Router::i()->getMatchingRoute("/$code")[0]->presenter !== "UnknownTextRouteStrategy")
return false;
$pUser = DB::i()->getContext()->table("profiles")->where("shortcode", $code)->fetch();
if(!is_null($pUser))
return false;
} }
$this->stateChanges("shortcode", $code); $this->stateChanges("shortcode", $code);