1.0.4 to 1.1

1.0.4 is bug fixes, functionnal enhancements and a refactoring of the public folder.

Special Files

Old files to keep in your current installation or not to copy in an existing installation.

  • some controllers
    • auth
    • installer
    • example
    • freakauth_demo
  • some views
    • application/views/FreakAuth_light/content/installer.php
  • some config files
    • the _demo ones (routes, config, autoload)
    • freakauth_light.php
  • some new libs
    • application/libraries/MyFAL_demo.php
    • application/libraries/MyFALVal_demo.php

CI's config.php

If you used our config_demo.php file for your CI installation, you'll prefer to remove a line in the config.php:

$config['date_format']

Some comments have been added to this file in the Session Variables section. Please have a look at them.

We remind you that the FAL_auto_login_period key is not used.

freakauth_light.php

Comments

Comments have been reworked (typos removed and clarity enhanced).

Key changes

from to
FAL_deny_with_flash_message FAL_flash
FAL_use_security_code_login FAL_use_captcha_login
FAL_use_security_code_register FAL_use_captcha_register
FAL_use_security_code_forgot_password FAL_use_captcha_forgot_password
captcha section
FAL_security_code_case_sensitive FAL_captcha_case_sensitive
FAL_security_code_upper_lower_case FAL_captcha_upper_lower_case
FAL_security_code_use_numbers FAL_captcha_use_numbers
FAL_security_code_use_specials FAL_captcha_use_specials
FAL_security_code_min FAL_captcha_min
FAL_security_code_max FAL_captcha_max
FAL_security_code_image_font_size FAL_captcha_image_font_size
FAL_security_code_image_font_color FAL_captcha_image_font_color
FAL_security_image_library FAL_captcha_image_library
FAL_security_code_base_image_path FAL_captcha_base_image_path
FAL_security_code_image_base_image FAL_captcha_image_base_image
FAL_security_code_image_font FAL_captcha_image_font
FAL_security_code_image_path FAL_captcha_image_path
FAL_security_code_image FAL_captcha_image
validation rules section
FAL_user_security_code_field_validation FAL_user_captcha_field_validation

Value changes

FAL_captcha_base_image_path: we changed it from public/images/captcha/ to $config['FAL_assets'].'/'.$config['FAL_images'].'/captcha/'. If you use the basic setting, everything will be fine, but else you'll know what to do...

Forms have been moved to the $config['FAL_template_dir'].'content/forms' directory. So if you kept basic settings, please copy-paste the VIEW SETTINGS until // CAPTCHA VIEW to your freakauth_light.php file.

Additions

Those sections have been added:

  • Enable/Disable FreakAuth light extensions
  • Whether the registration/activation process requires e-mail verification
  • Directory for FreakAuth_light views assets

This line has been added:

$config['FAL_captcha_img_tag_view'] = $config['FAL_template_dir'].'content/forms/html_for_captcha';

Form Views

We moved (with modifications!!!) those four view files

  • application/views/FreakAuth_light/content/change_password.php
  • application/views/FreakAuth_light/content/forgotten_password.php
  • application/views/FreakAuth_light/content/login.php
  • application/views/FreakAuth_light/content/register.php

to

  • application/views/FreakAuth_light/content/forms/change_password.php
  • application/views/FreakAuth_light/content/forms/forgotten_password.php
  • application/views/FreakAuth_light/content/forms/login.php
  • application/views/FreakAuth_light/content/forms/register.php

New and Modified Files

If you just want to upload the new files or the one that have been changed, take care of those:

modified

  • application/controllers/admin/admins.php
  • application/controllers/admin/example.php
  • application/controllers/admin/users.php
  • application/controllers/installer.php
  • application/helpers/freakauth_light_helper.php
  • application/libraries/FAL_validation.php
  • application/libraries/Freakauth_light.php
  • application/views/FreakAuth_light/template_admin/users/add.php
  • application/views/FreakAuth_light/template_admin/users/detail.php
  • application/views/FreakAuth_light/template_admin/users/edit.php
  • application/views/FreakAuth_light/template_admin/users/list.php
  • application/models/FreakAuth_light/usertemp.php
  • application/models/usermodel.php

new

  • application/views/FreakAuth_light/content/forms/html_for_captcha.php

Public Folder

This part is optional. If you do not want to adopt the new assets folder structure, simply change the TEMPLATE SETTINGS in application/config/freakauth_light.php in order to make them accomplish your needs!

Create those folders in /public: frontend, frontend/css, admin, admin/css, and shared, then

  • move public/css/fal_style.css into public/frontend/css/
  • move the public/css/images folder to public/frontend/css/images
  • move public/css/admin_console.css into public/admin/css/
  • move and rename the public/css/images_adminconsole folder to public/admin/images

If you used our admin_console.css, replace the old one by the new one.
If you used yours, you will know better than we do what to do:

just replace images_adminconsole occurences with ../images (4 occurences) images_adminconsole/arrow.gif with ../../shared/images/arrow.gif (1) images/error.png with ../../shared/images/error.png (1)

  • remove the old public/css folder
  • move the public/js folder to public/shared/js

If you change the default TEMPLATE SETTINGS, remember to edit the CSS files in order to make them point to the right folders were you put your images.

1.0.3 to 1.0.4

1.0.4 is bug fixes and some functionnal enhancements.

files to keep

do not copy

  • some controllers
    • auth
    • installer
    • example
    • freakauth_demo
  • some views
    • application/views/FreakAuth_light/content/installer.php
  • some config files
    • the _demo ones (routes, config, autoload)
    • freakauth_light.php

This last file suffered big changes in the comments (better presentation), but also functionnal changes (see the changesets).

The new file is much more readable, so we advise you to use it. But if you just want to modify your old file, here is what you have to do:

change

$config['FAL_denied_from_ext_location'] = 'auth'; // if the denied user comes from another website
                            // and is a guest, this is the CI location to take him (login page by default)

to

$config['FAL_denied_from_ext_location'] = ''; // if the denied user comes from another website
                            // and is NOT a guest, this is the CI location to take him
                            // guests are taken to the login page (see the FAL_login_uri key)

add

/*-------------------------------------+
|  CUSTOM CONTROLLERS NAMING SETTINGS  |
+-------------------------------------*/

 /*
 | You can name the controllers and relative actions as you like.
 | Namely you can place the login, logout, register, changepassword... actions
 | in a single controller (like we did in the demo application),
 | or in several controllers at your choice.
 | If you want to use this freedom you must set/change the following parameters.
 | For each of the following settings you must provide the controller_name/method_name
 | (or simply the controller_name if you just have a index() method in it.
 | --------
 | NOTE!
 | --------
 | For
 | - $config['FAL_activation_uri']
 | - $config['FAL_forgottenPasswordReset_uri']
 | it is compulsory to specify both the controller/method even if the
 | method is index()
 */
 $config['FAL_login_uri'] = 'auth/login';
 $config['FAL_logout_uri'] = 'auth/logout';
 $config['FAL_register_uri'] = 'auth/register';
 $config['FAL_activation_uri'] = 'auth/activation';  //read the above note
 $config['FAL_changePassword_uri'] = 'auth/changepassword';
 $config['FAL_forgottenPassword_uri'] = 'auth/forgotten_password';
 $config['FAL_forgottenPasswordReset_uri'] = 'auth/forgotten_password_reset'; //read the above note

and

    //  FORGOTTEN PASSWORD
$config['FAL_user_email_field_validation_forgotten'] = 'trim|required|valid_email|xss_clean|email_exists_check';

change

$config['FAL_password_required_confirm_validation'] = 'trim|required|xss_clean';

to

$config['FAL_password_required_confirm_validation'] = 'trim|required|xss_clean|matches[password]';

remove

$config['FAL_forgotten_password_reset_continue_action'] = 'auth/changepassword';

new and modified files

A=added M=modified

M      www/system/application/config/freakauth_light.php
M      www/system/application/helpers/freakauth_light_helper.php

M      www/system/application/language/english/freakauth_lang.php
A      www/system/application/language/english/index.html
A      www/system/application/language/index.html

M      www/system/application/controllers/auth.php
M      www/system/application/controllers/admin/users.php

M      www/system/application/libraries/FAL_front.php
M      www/system/application/libraries/FAL_validation.php
M      www/system/application/libraries/Freakauth_light.php

M      www/system/application/views/FreakAuth_light/template_admin/users/add.php
M      www/system/application/views/FreakAuth_light/template_admin/footer.php

M      www/system/application/views/FreakAuth_light/email/forgotten_password_email.php
M      www/system/application/views/FreakAuth_light/email/forgotten_password_reset_email.php
M      www/system/application/views/FreakAuth_light/email/activation_email.php

M      www/system/application/views/FreakAuth_light/content/forgotten_password.php
M      www/system/application/views/FreakAuth_light/content/activation_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_reset_failed.php
M      www/system/application/views/FreakAuth_light/content/activation_failed.php
M      www/system/application/views/FreakAuth_light/content/change_password.php
M      www/system/application/views/FreakAuth_light/content/login.php
M      www/system/application/views/FreakAuth_light/content/register_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_reset_success.php
M      www/system/application/views/FreakAuth_light/content/register.php

M      www/system/application/views/FreakAuth_light/template/content.php
M      www/system/application/views/FreakAuth_light/template/menu.php
M      www/system/application/views/FreakAuth_light/template/examples/conditions.php

auth controller

No change this time! You can keep your good old one.

template files

change password fields

The compatibility is broken in the change_password view, the fields ids and names have been changed:

  • password is now old_password
  • new_password is now password

parameter of form_open

in application/views/FreakAuth_light/content/

  • change_password.php
  • forgotten_password.php
  • login.php
  • register.php

find the initial form opening tag

<?=form_open($this->uri->ruri_string() //...

and change $this->uri->ruri_string() with $this->uri->uri_string()






1.0.2 beta to 1.0.3

1.0.3 is not only minor fixes.

file names

we changed some file names

  • style.css to fal_style.css
  • lang files moved from system/ to system/application

files to keep

do not copy

  • some controllers
    • installer
    • example
    • freakauth_demo
    • auth
  • some views
  • some config files
    • the _demo ones (routes, config, autoload)
    • freakauth_light.php

Please add to your routes.php config file this line:

$route['admin/admins/:num'] = "admin/admins";

For the freakauth_light.php file, you'll have to modify it this way (this is a link to the changesets):

after the line

$config['FAL'] = TRUE;

please add

/*
 * boolean
 * if TRUE uses FLASH messages and redirect if not allowed
 * if FALSE loads the page you defined in $config['FAL_denied_page']
 */
 
$config['FAL_flash'] = TRUE;
/*
 * CI uri to take a guest
 * if the denied user comes from another website (login page by default)
 */
 
$config['FAL_denied_from_ext_location'] = 'auth';
/*
 * if we don't want to use a flash message
 * the page/view we want to load to display the deny message
 */
$config['FAL_denied_page'] = 'FreakAuth_light/template/denied';

please find the relevant lines that you'll replace by

$config['FAL_country_validation'] = 'trim|required|numeric|xss_clean|country_check';
$config['FAL_password_required_validation'] = 'trim|required|xss_clean|password_check';
$config['FAL_user_name_duplicate_validation'] = 'trim|required|xss_clean|username_check|username_duplicate_check';
$config['FAL_user_name_field_validation_login'] = 'trim|required|xss_clean';
$config['FAL_user_password_field_validation_login'] = 'trim|required|xss_clean';
$config['FAL_user_email_field_validation_register'] = 'trim|required|valid_email|xss_clean|email_duplicate_check';
$config['FAL_user_security_code_field_validation'] = 'trim|required|xss_clean|securitycode_check';

then please add

//------------------------------------
// ACTIONS FOR 'CONTINUE' BUTTONS
//------------------------------------

// The action to execute after REGISTRATION
$config['FAL_register_continue_action'] = '';

// The action to execute after ACTIVATION, wether it failed or it was successful
$config['FAL_activation_continue_action'] = 'auth';

// The action to execute after requesting FORGOTTEN PASSWORD
$config['FAL_forgotten_password_continue_action'] = '';

//The action to execute after PASSWORD RESET, wether it failed or it was successful
$config['FAL_forgotten_password_reset_continue_action'] = 'auth/changepassword';

new and modified files

A=added M=modified

A      www/system/application/libraries/FAL_front.php
A      www/system/application/libraries/FAL_validation.php

M      www/system/application/helpers/freakauth_light_helper.php
M      www/system/application/models/FreakAuth_light/usertemp.php
M      www/system/application/models/usermodel.php
M      www/system/application/models/userprofile.php
M      www/system/application/models/country.php
M      www/system/application/config/freakauth_light.php
M      www/system/application/controllers/auth.php
M      www/system/application/controllers/admin/admins.php
M      www/system/application/controllers/admin/example.php
M      www/system/application/controllers/admin/adminhome.php
M      www/system/application/controllers/admin/users.php
M      www/system/application/libraries/Freakauth_light.php
M      www/system/application/views/FreakAuth_light/template_admin/users/list.php
M      www/system/application/views/FreakAuth_light/template_admin/users/detail.php
M      www/system/application/views/FreakAuth_light/template_admin/users/edit.php
M      www/system/application/views/FreakAuth_light/template_admin/users/add.php
M      www/system/application/views/FreakAuth_light/template_admin/footer.php
M      www/system/application/views/FreakAuth_light/template_admin/menu.php
M      www/system/application/views/FreakAuth_light/template_admin/header.php
M      www/system/application/views/FreakAuth_light/email/forgotten_password_email.php
M      www/system/application/views/FreakAuth_light/email/activation_email.php
M      www/system/application/views/FreakAuth_light/content/activation_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_reset_failed.php

A      www/system/application/views/FreakAuth_light/content/turned_off.php
A      www/system/application/views/FreakAuth_light/content/login_anchor_user.php
A      www/system/application/views/FreakAuth_light/content/login_anchor_guest.php
M      www/system/application/views/FreakAuth_light/content/activation_failed.php
M      www/system/application/views/FreakAuth_light/content/change_password.php
M      www/system/application/views/FreakAuth_light/content/login.php
M      www/system/application/views/FreakAuth_light/content/register_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_success.php
M      www/system/application/views/FreakAuth_light/content/forgotten_password_reset_success.php
M      www/system/application/views/FreakAuth_light/content/register.php

A      www/system/application/views/FreakAuth_light/template
A      www/system/application/views/FreakAuth_light/template/content.php
A      www/system/application/views/FreakAuth_light/template/footer.php
A      www/system/application/views/FreakAuth_light/template/container.php
A      www/system/application/views/FreakAuth_light/template/index.html
A      www/system/application/views/FreakAuth_light/template/menu.php
A      www/system/application/views/FreakAuth_light/template/denied.php
A      www/system/application/views/FreakAuth_light/template/examples
A      www/system/application/views/FreakAuth_light/template/examples/conditions.php
A      www/system/application/views/FreakAuth_light/template/examples/example.php
A      www/system/application/views/FreakAuth_light/template/examples/examples.php
A      www/system/application/views/FreakAuth_light/template/examples/restricted.php
A      www/system/application/views/FreakAuth_light/template/header.php

A      www/public/css/fal_style.css
M      www/public/js/jquery.js

auth controller

If the auth controller of 1.0.2 was a bit tricky to customize if you wanted it to use your templating process,

Now the 1.0.3 one is simpler, but when upgrading, you'll have to rework this.

What I personnaly had to do:

  • in the constructor, assign to $this->_container the path to my main template from the views folder
  • add to $data the keys and the values my main template needs

I just noticed that the reset password heading may need fixing (I'll test and fix this soon), and that some headings are useless (set in FAL_front lib)

template files

The compatibility is broken, you have to change every

$this->validation->

with

$this->fal_validation->

in the auth controller views (frontend). The same doesn't apply for the template_admin views.