mirror of
https://github.com/openvk/openvk
synced 2025-03-20 16:28:16 +03:00
Fix short addr collision
This commit is contained in:
parent
fe13bbfdb8
commit
095b7960ca
2 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue