Login settings

This section of the control panel allows you to define all options regarding the login action for your site in a single, unified location. You will define everything from the table that stores the user data, to the session A session is a way to preserve certain data across subsequent accesses of the same web application. The session object contains many variables to store user information on the web server in a location that you choose in special files. The session support allows you to register arbitrary numbers of variables to be preserved across requests. Sessions are specific to individual users. As a result, every user has a separate session and has access to a separate set of Session variables. variables used in the page.

The user interface is divided into four tabs, each allowing you to set some specific options in regards to the login action:

The Options tab

This tab allows you to set general options regarding the login action:


 

To configure this dialog box, follow the instructions below:

  1. With the Encrypt password checkbox, you can decide whether to store the passwords as plain text, or using encryption Encryption is the transformation of data into a form unreadable by without a secret decryption key. Its purpose is to ensure privacy by keeping the information hidden from anyone for whom it was not intended, including those who can see the encrypted data.
  2. In the Validate against radio buttons, select what criteria will be used to validate the user data: you can select between Username/Password and the more complex Username/Password/Level.
  3. In the Auto login validity text-box, enter the number of days for which the auto login feature will be valid. After this period ends, users will not be automatically logged in when they attempt to visit a page with restricted access, but will be prompted to authenticate first.

    Tip
    : The Auto login cookie lasts 30 days from the last visit of the user. This means users who visit a website daily are virtually never required to authenticate.
  4. The three buttons on the right of the interface offer you the next functionality:
    ˇ  Click
    OK when you are done configuring the dialog box.
    ˇ  Click
    Cancel to exit without changing the login settings.
    ˇ  The Help button takes you to this help page.
    These buttons are common to all tabs of the Login settings interface.
  5. Click on the Database tab to continue configuring the Login settings.

The Database tab

This tab allows you to set up the database and table that stores user data:
 


 

 

To configure this dialog box options, follow the next steps:

  1. In the Connection drop-down menu, select the database connection used for your site.
  2. In the Table drop-down menu, select the database table that stores user details.
  3. In the Primary key drop-down menu, select the field that stores the primary key for the selected table.
  4. In the Username drop-down menu, select the table field that stores the user names. The table column should be set as a UNIQUE Key A unique key is defined to have no two of its values the same. The columns of a unique key cannot contain null values. The constraint is enforced by the database manager during the execution of INSERT and UPDATE statements. A table can have multiple unique keys. Unique keys are optional and can be defined in CREATE TABLE or ALTER TABLE statements. in the database structure, to prevent duplicate entries that will lead to a non-functional login.
  5. In the Password drop-down menu, select the table field that stores the user passwords.
  6. In the E-mail drop-down menu, select the table field that stores the user's e-mail address.
  7. In the Active drop-down menu, select the field that stores the activation state for the user. If no table column is selected in the drop-down menu, the Activation feature will not be available for use in the current application.
  8. In the Level drop-down menu, select the table field that stores the user level.
  9. In the Random key A random key is a randomly generated set of characters (alphanumeric) used for improving website security. It is commonly used in user account activation, online purchases, or other activities that use URL's which must be difficult to guess. This prevents potentially malvolent users to access the URL's by directly entering them in the browser window, in order to activate accounts for other users. for instance. drop-down menu, select the table field that stores the randomly generated key used when activating the account.
    Tip:

    Activation links that use a random key look like this:
    http://www.yourdomain.com?activate.php?kt_login_id=3&kt_login_random=3f6de6ea7e1a5897bec5fe997923412c
    Because of the random key that is attached at the end of this URL, this address is virtually impossible to guess. This means other users will not be able to activate your account just by entering the URL address in the browser or use your e-mail address to create accounts. When the user clicks on such a link, aside the account being activated, an automatic login will be performed as well.
  10. When done with the database settings, move on to the Session tab.

The Session tab

This is where you can configure what will be stored in session variables for each user that logs in successfully:

 

To configure this options tab, follow the steps below:

  1. In the Session variables grid, all session variables and their associated table columns are displayed. You can add or remove an entry by using the +/- buttons. You can only add session variables while there are table columns left unused. The table columns are taken from the user table selected in the Database tab.


                    
  2. You can edit the properties of the session variables that you added to the grid. Select the variable in the grid, then use the Session variable name and Table column text-boxes to set its corresponding options.
    Note:
    these two text boxes are disabled for the session variables that were automatically generated (according to your selection in the Validate against radio buttons of the Options tab).
  3. Click on the User levels tab to continue configuring the Login settings.

The User Levels tab

In the User Levels tab, you can select global redirect The redirect server behavior loads a new site page after a transaction is executed. For instance, users could be automatically redirected to their inbox after they log in to the website. options, as well as redirect options for each user level. Also, this is the place where you can define the user levels to compare against the ones stored in the database:

 

To configure this user interface, follow the next steps:

  1. In the Login page text-box enter the page that allows the user to login.
  2. In the Default redirect on success text-box enter the page that will be opened if the login operation succeeded.
  3. In the Default redirect on fail text-box enter the page to be opened when a user tries to access a page for which he/she does not have the needed credentials.
  4. In the User levels grid, all defined user levels and their associated redirect pages are displayed. You can add or remove user levels through the +/- buttons on top of the grid. To edit options for any of the user levels, select it from the grid, and set its options in the following text-boxes:
    ˇ  In the Level text box enter a number (e.g. 0, 1, 2 etc) that would indicate the access level.
    ˇ  In the Redirect on success text-box, enter the page to open if the login operation for the selected user level is successful. You can use the Browse button to locate the file.
    ˇ  In the Redirect on fail text-box, enter the page to open if the login operation fails for the selected user level. You can use the Browse button to locate the file.
  5. Click OK when you are done configuring the dialog box.
 

The Restrictions tab

In the Restrictions tab you can set options that block users, enable expiration dates for accounts and enforce a maximum number of login tries. This extra tab of the user interface is available only in MX Kollection Professional.
 

 
To configure the user interface follow the next steps:
  1. If you want to allow users only a limited number of login attempts, tick the Limit the login attempts checkbox.
  2. In the Alowed attempts text field enter the number of login attempts that an user is allowed to make.
  3. In the Login attempts column drop-down menu select the table column used to store the number of login attempts. The field must be set to store integer numbers and have enough length to store the maximum number of tries.
  4. In the Disable interval text field enter the duration - in hours - for which the user that has used up the maximum number of attempts is not allowed to login. The minimum is 1 hour.
  5. In the Disable date column drop-down menu select the table column used to store the date when the user is allowed to login again.
  6. If the account has to expire after an interval, and the user will no longer be allowed access through the login (e.g. for a limited time trial, or demo) tick the Enable account expiration checkbox. This will enable the second set of settings.
  7. In the Account expiration column enter the table column where the duration of the account availability is stored.
  8. In the Default expiration interval text field enter the interval, in days, for which the account is active. After this period passes, the user is no longer allowed access.
  9. In the Registration date field drop-down menu select the table field into which the date and time when the user has registered is saved.

 

The History tab

 
The History tab allows you to set options on what user action to log, and into which database. You can configure options to allow you to build statistics reports for user activity. This set of options is available only if you have MX Kollection 3 Professional.
 

 
To configure the user interface, follow the steps below:
  1. First decide whether you want to use the logging capabilities provided by MX Kollection Professional. To save your choice, tick the Use logger feature checkbox. This will enable adding transparent triggers to the login and logout actions which save information to the database.
  2. In the Table drop-down menu select the database table that you want to save the logging information into. The table must be related to the user table through a column.
  3. In the Primary key drop-down menu select the log table's primary key column.
  4. In the Foreign key to users' table drop-down menu select the table column that will store the relation between the user information table and the log table.
  5. In the IP address drop-down menu select the table column into which to save the user's IP address. The column must allow at least 30 characters.
  6. In the Last login date drop-down menu select the table column into which to save the date and time when the user last logged in.
  7. In the Last activity date drop-down menu select the table column to store the date and time when the user last left the site - through a logout.
  8. In the Session drop-down menu select the table column to store the length of the user session.
 
 
JFGD

loggin/history

What is the information stored in the Foreign key to users' table column ?

Where does is come from ? It is obviously not the id_users from the users table.

I want to capture this id_users in the field. How can I do this.

Thank you

JFGD

Loggin/history further question

In this table is the session N°.

How can I link this session N° to the session variables ?

In fact, I want to capture the session variables in addition to those contained in the history table.

How can I do this ?

Thank you

nemgue

In the option session what type of column should be ¿text integer, time. ..?  

James  Armstrong
07-18-2005

Question: Are the levels used for specific pages or are they recursive? For instance, can a level 2 user access all level "1" & "2" pages that I create? 

Answer: No, user levels are not recursive. You can have any number of levels you wish and you can even use text to define user levels (i.e. "admin", "visitor", instead of 1, 2). You can define which users are allowed to see a particular page when you apply the Restrict Access To Page server behavior to it (see how). You must define the actual user levels in the InterAKT Control Panel > Login Settings (see how).

Igor  Arefiev
10-17-2005

Question:
Is there any way to redirect to the reffering page using Login Form Wizard, similar to Dreamweaver's $MM_redirecttoReferrer?

Answer:
In MX User Login, this is the default behavior: if you try to access a page with restricted access, you will be redirected to the login page; after successful login, you will be taken back to the original page.

Eric  Northey
04-18-2006

Question:

How do you limit access to specific data?  For example how do I limit a user to only editing the data they added?

Answer:

To limit displaying information from a recordset to the one submitted by the currently logged in user, simply filter the recordset by the user ID which should match the one stored inside the kt_login_id session variable.

spear  head
07-05-2006

Question:
Is there a method that will allow a form POST action to set the kt_login_id session?  I wish to use this as an administrative method to alter data.

Answer:
Yes, you can create on the page to which the form posts information to a script that reads the ID from the form and saves its value into the kt_login_id session variable. It is advisable that you also check the user table before creating this variable, in order for the actual user to exist.