P
P
pavelberg2015-07-16 17:39:33
JavaScript
pavelberg, 2015-07-16 17:39:33

Will it prevent authorization without logging into the account (via email)?

We create a regional website for real estate ads.
Initially, they thought the authorization was normal + sign in through their accounts, mail, fb, and so on.
What do you think, will the model, where there is no registration, trample - without registration and without login, filled out the form with the content of the ad, mentioned the mail. An activation link is sent to your email. That's it, ad added. If you want to edit or delete, you enter from the same letter through the link, or again from the ad page you initiate sending a new letter with a token, you click the link from the email, and the control panel opens.
Is there any experience with such authorization? What do you think about this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Koryukov, 2018-11-27
@andreyz40r

Variables are created anew, but their content is thrown back and forth and eventually saved and even "increased".
Imagine pouring water from bucket to bucket. You take the second bucket, pour the water from the first bucket into it, and then, adding a mug of alcohol to the empty first bucket, pour the water back from the first bucket into it.
In this case, you can throw out an empty bucket after pouring water out of it and each time buy a new bucket to pour water into it.

V
Vladimir, 2018-11-27
@z3d01n

In JS, there is "hoisting" of variables.
In other words, your code is equivalent to the following:

function arrayToList(arr) {
  var i;                 // На самом деле именно здесь определяются все переменные
  var nextRest;          // данной функции объявленные
  var list;              //  через ключевое слово "var"

  for (i = arr.length - 1; i >= 0; --i) {
    nextRest = list || null;
    list = {};

    list["value"] = arr[i];
    list["rest"] = nextRest;
  }

  return list;
}

If you want this raising not to happen, then define variables through the let keyword. For let, variable raising does not occur.

S
Stalker_RED, 2018-11-27
@Stalker_RED

They are created and connected in a "chain", so that each element refers to its neighbor.
This is the point of a singly linked list .

D
Dmitry Entelis, 2015-07-16
@pavelberg

The risk of initially entering an incorrect email, followed by the loss of the ability to do something with your ad. Better transparently register&authorize the user when creating the first ad.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question