Automatic connection after registration

Go down

Do you agree or disagree ?

Automatic connection after registration Left11100%Automatic connection after registration Right11 100% 
[ 6 ]
Automatic connection after registration Left110%Automatic connection after registration Right11 0% 
[ 0 ]
 
Total Votes : 6
 

Automatic connection after registration Empty Automatic connection after registration

Post by MattiaDes Fri 08 Jan 2021, 17:01

In all forums happens that several users register without ever connecting.

It would be nice if after registration the user was automatically logged in, without having to manually enter the data that he has already specified during the registration.

The automatic connection should obviously only take place if the activation of the account after registration was direct (without having to confirm by email or via an administrator).

I used this code to do this in the past, but it's not very safe. It would be better if it was native on all forums:

Code:
jQuery(document)["ready"](function() {
    if (_userdata["session_logged_in"] === 0) {
        jQuery("#ucp input[name="submit"]")["on"]("click", function() {
            var variable_0 = document["getElementById"]("username_reg")["value"];
            var variable_1 = document["getElementById"]("password_reg")["value"];
            localStorage["setItem"]("textuser", variable_0);
            localStorage["setItem"]("textpass", variable_1)
        });
        jQuery(window)["load"](function() {
            storedValueUser = localStorage["getItem"]("textuser");
            storedValuePass = localStorage["getItem"]("textpass");
            if (storedValueUser && storedValuePass) {
                var variable_2 = storedValueUser;
                var variable_3 = storedValuePass
            };
            jQuery["post"]("/login", {
                username: variable_2,
                password: variable_3,
                login: "Login"
            })
        })
    }
});

Another thing: it would be nice if when a user log-in via the widget they were redirected to the page where they were, instead of the index.

What do you think?
MattiaDes
MattiaDes
Active Poster

Male Posts : 1046
Reputation : 58
Language : Italian, English
Location : Italy

View user profile http://www.habbolifeforum.com/

YoshiGM, TonnyKamper and ChuckWheat like this post

Back to top Go down

Automatic connection after registration Empty Re: Automatic connection after registration

Post by TonnyKamper Sat 09 Jan 2021, 16:11

Agreed voted yes
TonnyKamper
TonnyKamper
Forumember

Female Posts : 727
Reputation : 67
Language : Dutch/English
Location : The Netherlands

View user profile http://www.nederlandheelt.nl/forum

Back to top Go down

Automatic connection after registration Empty Re: Automatic connection after registration

Post by YoshiGM Sat 09 Jan 2021, 16:49

That will facility the connection of some new members that's not understand the forum.
I Voted yes!
YoshiGM
YoshiGM
Active Poster

Male Posts : 1081
Reputation : 131
Language : Spanish & English
Location : Mexico

View user profile http://asistencia.foroactivo.com/u21373

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum