Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]joytopia[/eluser]
Email functions: bug-fixes and new features

Bug-fixes:

forgotten_password and forgotten_password_complete:
in case of success an error-message was set instead of set_message.

Plain-text version of emails did not show the link.
This is fixed by the email_with_markers feature.

New features:

email_with_markers:

Code:
$config['email_templates']     = 'auth/email_with_markers/';

now uses a set of email templates with markers ###subject###, ###message### and ###alt_message###

So you have a comfortable control over functionality, look an feel of your emails.

You can use the methods
Code:
$this->ion_auth->get_message_from_template($template, $data)

and
Code:
$this->ion_auth->send_email($email, $subject, $message, $alt_message = '')
everywhere in your application to easily send well designed admin-emails.

Now supports mailtype

simply set
Code:
/**
     * Mail type, 'text' or 'html'
     */
    $config['mailtype']     = 'html';


Send email and / or return a data-array

Code:
/**
     * Send email
     * Ion_auth either sends an email directly (and returns bool)
     * or it returns a data-array, so that you can write your own email methods
     * or both
     * set to 'email', 'data' or 'both'
     * Default : 'email'
     */
    $config['send_email']     = 'email';

So you can easily do so something with calculated data directly after the registration, i.e. update some fields in the database or show the new user his user_id or make your own confirmation-process.


I tested as well as I could. It should be fully backward compatible.
As I am not yet on GitHub, I post the files here.

Thank you for your feedback!

Best regards

Bernd


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 05-13-2010, 02:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB