Welcome Guest, Not a member yet? Register   Sign In
DX Auth 1.0.6 (Authentication library)

[eluser]Houly[/eluser]
jepp. Like i said, even the new account won't work. I can even send a new password, and the email comes to my adress.

[eluser]Houly[/eluser]
Sorry, but I'm an idiot Big Grin

I only turned on “Login by Email” and fogot it. Damn it Big Grin

[eluser]tpchris[/eluser]
Can you help clarify the case sensitivity of DX_Auth 1.0.6?

I have a user in the users table called john. If I try to register a new account with John (capital J) I get the message that the username is already taken.

I have a user in the userstemp table called aaaa. If I try to register a new account with AAAA a new record for AAAA is added to userstemp.

In the first example it appears that the username is case sensitive but in the 2nd case it's not. Why is there a discrepancy?


Along those same lines I have a user in userstemp called bill with email [email protected]. If I try to register a new account with pete and email [email protected] (same email, uppercase T) the account is accepted. This wasn't the result I was expecting since email addresses are case insensitive.

Would these two cases be considered bugs?

Thanks for the work on this library! It's saved me alot of work!

[Update]

If you open the models/dx_auth/user_temp.php file and search for check_username and check_email methods replace the db->where statements with the following:

check_username:
$this->db->where('LOWER(username)=', strtolower($username));

check_email:
$this->db->where('LOWER(email)=', strtolower($email));

Since this is a change to the lib itself you may lose changes if there's an upgrade.


[/Update]

[eluser]thors1982[/eluser]
I have a permissions question.

I have a class View, with function Page, and I pass in a parameter to view whatever page is passed in.

I want to restrict users to certain pages but I can't with the Uri_permissions because it doesn't except the passed in parameter. If I give them access to /View/Page/ they can view all the pages.

Any suggestions on how to do this with DX_AUTH

Can I do this with custom_permissions? If so how... I can't seem to find where to edit the current custom_permissions ("edit" and "delete") or add new ones, or if it will be possible to add new ones easily when a new page is created.

[eluser]Spir[/eluser]
I use email activation/forgot email but I see we can't setup our own email conf.
But since the "_email" is used when sending emails then it has been easy for me to setup some conf.

my _email function looks like this now (class DX_Auth starting line ~169) :

Code:
function _email($to, $from, $subject, $message){
         $this->config->load('email');    
            
        $config['useragent'] = $this->config->item('useragent');
        $config['protocol'] = $this->config->item('protocol');
        $config['mailpath'] = $this->config->item('mailpath');
        $config['smtp_host'] = $this->config->item('smtp_host');
        $config['smtp_user'] = $this->config->item('smtp_user');
        $config['smtp_pass'] = $this->config->item('smtp_pass');
        $config['smtp_port'] = $this->config->item('smtp_port');
        $config['smtp_timeout'] = $this->config->item('smtp_timeout');
        $config['wordwrap'] = $this->config->item('wordwrap');
        $config['wrapchars'] = $this->config->item('wrapchars');
        $config['mailtype'] = $this->config->item('mailtype');
        $config['charset'] = $this->config->item('charset');
        $config['validate'] = $this->config->item('validate');
        $config['priority'] = $this->config->item('priority');
        $config['crlf'] = $this->config->item('crlf');
        $config['newline'] = $this->config->item('newline');
        $config['bcc_batch_mode'] = $this->config->item('bcc_batch_mode');
        $config['bcc_batch_size'] = $this->config->item('bcc_batch_size');        
        
        $this->ci->load->library('Email');
        $email = $this->ci->email;
        
        $email->initialize($config);
        $email->set_newline($this->config->item('newline'));

        $email->from($from);
        $email->to($to);
        $email->subject($subject);
        $email->message($message);

        return $email->send();
    }

My email conf looks like this :

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config['useragent'] = 'CI'; // The "user agent".
$config['protocol'] = 'smtp'; // mail, sendmail, or smtp    The mail sending protocol.
$config['mailpath'] = ''; // The server path to Sendmail.
$config['smtp_host'] = 'mySMTPServer'; // SMTP Server Address.
$config['smtp_user'] = ''; // SMTP Username.
$config['smtp_pass'] = ''; // SMTP Password.
$config['smtp_port'] = '25'; // SMTP Port.
$config['smtp_timeout'] = '5'; // SMTP Timeout (in seconds).
$config['wordwrap'] = TRUE; // TRUE or FALSE (boolean)    Enable word-wrap.
$config['wrapchars'] = 76; // Character count to wrap at.
$config['mailtype'] = 'html'; // text or html Type of mail. If you send HTML email you must send it as a complete web page. Make sure you don't have any relative links or relative image paths otherwise they will not work.
$config['charset'] = 'utf-8'; // Character set (utf-8, iso-8859-1, etc.).
$config['validate'] = FALSE; // TRUE or FALSE (boolean)    Whether to validate the email address.
$config['priority'] = 3; // 1, 2, 3, 4, 5    Email Priority. 1 = highest. 5 = lowest. 3 = normal.
$config['crlf'] = "\r\n"; // "\r\n" or "\n" or "\r" Newline character. (Use "\r\n" to comply with RFC 822).
$config['newline'] = "\r\n"; // "\r\n" or "\n" or "\r"    Newline character. (Use "\r\n" to comply with RFC 822).
$config['bcc_batch_mode'] = FALSE; // TRUE or FALSE (boolean)    Enable BCC Batch Mode.
$config['bcc_batch_size'] = 200; // Number of emails in each BCC batch.

/* End of file email.php */
/* Location: ./system/application/config/email.php */

sharing in case...
Thanks for all the work.

[eluser]haderach[/eluser]
Hi all,

i've installed dx_auth on my server and i have a problem when i try to log in.
I have the message

Code:
A PHP Error was encountered

Severity: 4096

Message: Object of class stdClass could not be converted to string

Filename: libraries/Session.php

Line Number: 683
A PHP Error was encountered

Severity: Notice

Message: Object of class stdClass to string conversion

Filename: libraries/Session.php

Line Number: 683

I have these message, but i'm log in. when i logout there no error message. Do you have an idea?
It seems that the problem is in the _serialize() function...

Thank sfor your help

[eluser]haderach[/eluser]
I found the correction of this issue

http://ellislab.com/forums/viewthread/95690/

[eluser]nell789[/eluser]
StackOverflow user Jens Roland a pros/cons list about DX Auth here: http://stackoverflow.com/questions/34698...ry-is-best , but that was back in January. It seems that there has been changes to this library since then. Have any of the issues he mentions in the cons list been addressed?

[eluser]RS71[/eluser]
Can I do user permissions with this library?

As in, set the values for various permissions in the user's session and have the script check permissions?

[eluser]CroNiX[/eluser]
[quote author="RS71" date="1236911881"]Can I do user permissions with this library?

As in, set the values for various permissions in the user's session and have the script check permissions?[/quote]
Yes.
There are many options.
There are user roles that you can check. Such as "Administrator", "Editor", whatever you define.
Then, each role can have various permissions which you can also check.
Like Administrators can have all permissions, an Editor may have "edit, write, save" permissions or whatever you define.

You can check by role and/or permissions for that role.

These are built in and you don't have to save them in session, they already are.

On top of that, you can define permissions for each controller to allow access to that controller based on role/permissions or both.

Its very flexible. Hope that helps...




Theme © iAndrew 2016 - Forum software by © MyBB