mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Force create authenticated user when same target is true and prime embed throws 403
This commit is contained in:
parent
e74c4a47a9
commit
f58a43a388
@ -368,9 +368,11 @@
|
|||||||
lock_login_fields();
|
lock_login_fields();
|
||||||
|
|
||||||
var guild = query_guild();
|
var guild = query_guild();
|
||||||
guild.fail(function() {
|
guild.fail(function(data) {
|
||||||
unlock_login_fields();
|
unlock_login_fields();
|
||||||
if (visitors_enabled) {
|
if (data.status == 403 && getParameterByName("create_authenticated_user") == "true" && getParameterByName("sametarget") == "true") {
|
||||||
|
wait_for_discord_login();
|
||||||
|
} else if (visitors_enabled) {
|
||||||
setVisitorMode(true);
|
setVisitorMode(true);
|
||||||
var guild2 = query_guild();
|
var guild2 = query_guild();
|
||||||
guild2.done(function(data) {
|
guild2.done(function(data) {
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
<a id="discordlogin_btn" href="{% if not same_target %}{{ url_for("embed.login_discord", _external=True) }}{% else %}{{ url_for("user.login_authenticated", redirect=request.url, _external=True) }}{% endif %}" class="waves-effect waves-light btn-large" {% if not same_target %}target="_blank"{% endif %}>{{ _("Discord Login") }}</a>
|
<a id="discordlogin_btn" href="{% if not same_target %}{{ url_for("embed.login_discord", _external=True) }}{% else %}{{ url_for("user.login_authenticated", redirect=request.url+"&create_authenticated_user=true", _external=True) }}{% endif %}" class="waves-effect waves-light btn-large" {% if not same_target %}target="_blank"{% endif %}>{{ _("Discord Login") }}</a>
|
||||||
<p>*{{ _("You will be invited into this server.") }}</p>
|
<p>*{{ _("You will be invited into this server.") }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% if unauth_enabled %}
|
{% if unauth_enabled %}
|
||||||
|
Loading…
Reference in New Issue
Block a user