PRIV S55a Login & Register Process

Page no: S55a


Registering Process

Update April 27:
The register process is done by Mailpoet. User data are copied into the WordPress DB.

Edit Detail Process

A user is able to manually edit its data after he got registered. This is the form, but it should be called “edit my data”.

It contains additional attributes like name, password and language.

FireShot Screen Capture #030 - 'SNB CHF Blog The Swiss National Bank and Swiss Franc Blog -SNBCHF_COM' - swissnationalbank_org



My idea is very simple. I make different (without connection to wordpress login / register forms or any plugins). In that form I put what I want (We will check the user country via ip and it will be selected. He can select any other if he wants. After proceeding the form – I can make what I want. I will use core db functionality and add user in db, after that I can add his ip in second table with second query. Login is the same – different form, I only log in user via core wp functionality and check for ip. Simple. I’m almost ready. Just some tests tomorrow. I will put all of this in popups and it will be perfect. 🙂 The good part is that we have full access to every part of the code and can be easily changed.

  • We use the core wordpress db for registering user
  • The fields are: IP, REVERSE IP, COUNTRY
  • TO DO: We need these fields: Language, Login, Livefyre loginCountry & CSS additional:

Our table structure is IP | COUNTRY – super optimized (query with 1M rows will be 0.05s, now: 0.001)

We check on first page view (impression) if we have the ip in our db. If we have it, we set globally (no any other checks) the language.

We add in the table using the register – On successful register, we add the user ip and country.
TO DO: We have to use API for finding the country of the IP

We add also with the login form – on every successful login, if the ip is not in our db, we add it.
TO DO: We have to use API for finding the country of the IP


  1. store all data in the Memory
  2. proceed the form from cookie
  3. store the user in the core DB
  4. Store additional data in the second table


1. Precondition: User not registered
2. Test: Store all attributes, Name, first Name, Email, language, Country,
and Lifefyre Login, Login (both optional)
and IP (not shown to user) to the WordPress DB in the WordPress user table and Extension table
— User enters his data (Name, first Name, lang….)
3. Postcondition: a DB entry for this user exists in both WordPress and Extension table

Display users

Display registered users in WP admin:

We will probably a new plugin that extends the user attributes in the WP backend with the new fields
We could call them “user-defined 1”, “user-defined 2”, and give them a XML like idenfication
<field Name> <field value>
This inside WP user is too much hard-coded
Field Name : Field Value
for example “ Login” “NikoDimitri”
and “lifefyre Login” “NikoDimitri”
and “Country”: “Bulgaria”
and “Language” “Bulgarian”
The Extension with the “additional fields” section is a new plugin


Login form:

  • We need e-mail and password for login.
  • We use the core remember me functionality for cookie login.

Testing Login:
1. Precondition: Users are registered  (today’s work)
2. Test: I would like to test how you identify the user:
First case: cookie
3. Postcondition: user correctly identified
Second case: no cookie exists:
1. Precondition: User registered, No Cookie exists
2. Test: User must use Login functionality
3. Postcondition: Cookie gets set, user logged into WordPress
Third case: Login via Livefyre comment system
1. Precondition: User registered, No Cookie exists
2. Test: User gets looged in via Lifefyre comment system
3. Postcondition:  Postcondition: Cookie gets set, user logged into WordPress


Lost password

  • We use the core lost password functionality.
  • TODO: We need some tests here

Managing users:

  • We use the core WP USER table (Users->all users). We add the new fields there. TO DO: Add the rest of the fields
  • Editing user – TO DO: Add the new fields in editing page



Tags: ,

See more for C5x Community