top of page

Show me my LogIn-Status

xxxxx

Log me out
SHOW
Log me in

Show me my ID

My ID

SHOW

Show me my eMail

CLOSE.png
Log-In

stat

eMail

Original-Log-In
SHOW
Show-Code

CODE

CLOSE.png

 

 

function show_Status (parameter) {console.log("Show-Status started.")

    let logStatus = wixUsers.currentUser.loggedIn

    console.log(logStatus)

 

    if (logStatus==false) {$w('#TXToutput1').text = "You are not loged-in."}

    else {$w('#TXToutput1').text = "Congratulation, you are loged-in."}

}

 

 

 

​
 

function show_ID (parameter) {console.log("Show-ID started.")

    let userID = wixUsers.currentUser.id

    console.log(userID)

    $w('#TXToutput2').text = ("Your User-ID is " + userID)

}

 

 

 

​
 

function show_eMail (parameter) {console.log("Show-ID started.")

    let eMail = wixUsers.currentUser.getEmail()

 

    .then( (email) => {

        let userEmail = email;

        console.log(userEmail)

        $w('#TXToutput3').text = (userEmail)

    } );

​

​

​

​

​

function logIn (parameter) {

    var ERROR

    let email = $w('#input1').value

    let password = $w('#input2').value

 

    wixUsers.login(email, password)

    .then( () => {

        console.log("User is logged in");

    //  if (err != -19976 && err != -19988) {console.log("GO"), $w('#BOX2').hide(), $w('#BTN1').enable()}

    if (ERROR != -19976 && ERROR != -19988) {$w('#BOX1').hide(), check_LogStatus()}

    } )

    .catch( (err) => {

        ERROR = err

        console.log(err);

        if (err == -19976) {console.log("Wrong password !"), $w('#TXToutput4').text = "Wrong password !"}

        else if (err == -19988) {console.log("Unknown or wrong eMail !"), $w('#TXToutput4').text = "Unknown or wrong eMail !"}

        else {console.log("GO"), $w('#BOX1').hide(), $w('#BTN1').enable()}

    } );

}

​

​

​

​

​

function check_LogStatus (parameter) {

    let logStatus = wixUsers.currentUser.loggedIn

 

    if (logStatus == true) {$w('#BTN1').enable(), $w('#BTN3').disable()}

    else {$w('#BTN1').disable(), $w('#BTN3').enable()}

}

Log-In function

Shows the User-eMail

Shows the LogIn-Status

Shows the User-ID

Checks the LogIn-Status

Comment-Box

CLOSE.png

Version-1.0

Under_Construction.png

Leave a comment. . .

Arrow.png

General-Settings

ON                 OFF

Show Text-Length

ON                 OFF

max. Text-Length

ON                 OFF

Show Key-Press

ON                 OFF

Show Key-Code

ON                 OFF

Show Total-Count

Character-limit

Load default settings
Save
russian-dima 00:08:25

! YES ! Arthur is out there XDDDDDDDD

30.7.2020
russian-dima 00:08:07

Hello! Some one out there?

30.7.2020
russian-dima 18:55:23
29.7.2020
russian-dima 17:26:48

No problem, you are welcome ;-)

24.7.2020
arthurvalatin 22:54:45

Very helpful tutorial russian-dima! Thank you so much!

24/07/2020
Page 1 of 1
Design
Settings
About
CLOSE.png
Leave a comment, or start a chat.

Post-Comment

- - -

Pressed-Key

- - -

Key-Code

Text-Length

- - -

max. Text-Length

- - -

Number of Comments

- - -

designed & developed by russian-dima

Write a comment
bottom of page