ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DX Auth 1.0.6 (Authentication library)

December 01, 2008 6:14am

Subscribe [160]
  • #406 / Mar 17, 2009 7:07pm

    hugle

    289 posts

    Thank you CroNiX!

    I have chosen the 1st option:

    RewriteCond %{HTTP_HOST} ^yourdomain.com
    RewriteRule (.*) <a href="http://www.yourdomain.com/$1">http://www.yourdomain.com/$1</a> [R=301,L]

    Works as it should to 😊

    thank you very much!

    see you around 😊
    Jaroslav

  • #407 / Mar 18, 2009 6:38am

    alex-and-r

    11 posts

    Hi to everyone and especially to DX Auth author! 😊 Thanks for the lib!

    I’ve got a question.

    In this example of form validation from the CI documentation the rules set for password field include md5. Its here:

    $this->form_validation->set_rules(‘password’, ‘Password’, ‘trim|required|matches[passconf]|md5’);

    So when form is repopulated in case of error we get not the password as is in the appropriate field, but a md5 of it. I believed it’s done with intention of adding security for such private user data as password.
    But when I tried to implement the same “md5” rule for my password field while using DX Auth I got the situation that a password saved in DB is this md5 of original password and not password itself. So basically I cannot login with my original password, but can do it with md5 of it.

    Can anyone point a solution to leave this md5 validation rule and still get “normal” password in DB? Or don’t I need this additional md5 rule at all?

  • #408 / Mar 18, 2009 7:26am

    Wooo

    6 posts

    I got it to work. The DX_Auth library seemed not to be able to load the config file because of a fault (I think) in the code. The problem was solved when I changed line 35 from:
    $this->ci->load->config(‘dx_auth’);

    into:
    $this->ci->config->load(‘dx_auth’);

  • #409 / Mar 19, 2009 6:32pm

    Wooo

    6 posts

    When I used the captchas, I only saw the box asking for the code, I didn’t see any image at all, so I just turned it off.

    I had the same issue. The problem was solved by removing the dot from the captcha’s file name. To do this, I altered system/plugins/captcha_pi.php. At line 246, I changed

    $now = ((float)$usec + (float)$sec);

    into

    $now = ((int)$usec + (int)$sec);

  • #410 / Mar 20, 2009 12:02am

    PoetaWD

    97 posts

    Hello guys,

    I am editing this post to say that I love the library !

    Thank you !  Very simple code and lots of features !

    Thank you!

    I have a question for you guys…

    I am making a management app…  first time using CI…

    I want to make so that the user cant do anything in the system without being logged in…

    I am doing like this:

    if ($this->dx_auth->is_logged_in())   
            {
              MY CODE COMES HERE
            }
           else  
            {   
                redirect('auth');   
            }

    I am adding this to EVERY function… is there a simple way to do the checking ?

    thanks

  • #411 / Mar 20, 2009 2:13am

    hugle

    289 posts

    Hello guys,

    I am editing this post to say that I love the library !

    Thank you !  Very simple code and lots of features !

    Thank you!

    I have a question for you guys…

    I am making a management app…  first time using CI…

    I want to make so that the user cant do anything in the system without being logged in…

    I am doing like this:

    if ($this->dx_auth->is_logged_in())   
            {
              MY CODE COMES HERE
            }
           else  
            {   
                redirect('auth');   
            }

    I am adding this to EVERY function… is there a simple way to do the checking ?

    thanks

    hello, try something like:

    class main extends Controller {
    
        function main()
        {
            parent::Controller();
                if (!$this->dx_auth->is_logged_in())   
                {   
                    redirect('auth');   
                }    
        }
            function index() {
                echo 'logged in';
            }
            function test() {
                echo 'logged in';
            }
    }

    good luck!

    /me loves this library too:)

  • #412 / Mar 20, 2009 9:23am

    alex-and-r

    11 posts

    Hi again every one.

    It seems nobody’s going to answer my previous post, but it’s ok. 😊 I’m not complaining! 😉

    I’ve got new question instead!

    Guys, can anyone help me and point me to the instruction of how do I set permissions on uri basis?! I just don’t get it!!! :(

    Here is my situation:
    I’ve got 2 roles (admin and user). I’ve got controller with various functions. I’ve got “$this->dx_auth->check_uri_permissions();” string in constructor of this controller. I want to set uri permission for user role so that all users can access this controller and all it’s functions. How can I set this permissions?

    I don’t need back end. All I need is to set it once and forget about it. I tried to do it by manually running the following function:

    function test_set_perm()
        {
            // Load model  
            $this->load->model('dx_auth/permissions', 'permissions');
    
            $allowed_uris = explode("\n", '/shoplist/');
    
            $this->permissions->set_permission_value(1, 'uri', $allowed_uris);
        }

    But it doesn’t work.

    What should I do?

  • #413 / Mar 20, 2009 10:53am

    vxav

    3 posts

    hi every one, I’ve got a problem with DX_Auth and captcha : I always have a captcha expired error.

    Any idea ?

    Thanks for your help !

  • #414 / Mar 20, 2009 11:21am

    jcavard

    130 posts

    Hi again every one.

    It seems nobody’s going to answer my previous post, but it’s ok. 😊 I’m not complaining! 😉

    I’ve got new question instead!

    Guys, can anyone help me and point me to the instruction of how do I set permissions on uri basis?! I just don’t get it!!! :(

    Here is my situation:
    I’ve got 2 roles (admin and user). I’ve got controller with various functions. I’ve got “$this->dx_auth->check_uri_permissions();” string in constructor of this controller. I want to set uri permission for user role so that all users can access this controller and all it’s functions. How can I set this permissions?

    I don’t need back end. All I need is to set it once and forget about it. I tried to do it by manually running the following function:

    function test_set_perm()
        {
            // Load model  
            $this->load->model('dx_auth/permissions', 'permissions');
    
            $allowed_uris = explode("\n", '/shoplist/');
    
            $this->permissions->set_permission_value(1, 'uri', $allowed_uris);
        }

    But it doesn’t work.

    What should I do?

    Try accessing http://www.your-site.com/backend/uri_permissions/ this is the built-in interface to deal with permissions. I think that’s what you looking for.

  • #415 / Mar 20, 2009 12:20pm

    vxav

    3 posts

    hi every one, I’ve got a problem with DX_Auth and captcha : I always have a captcha expired error.

    Any idea ?

    Thanks for your help !

    That’s Ok, it was due to a <link> tag pointing to a bad stylesheet in my header!

  • #416 / Mar 20, 2009 1:39pm

    otn3m3m

    20 posts

    How do I register a user as an admin when the user is registering?

  • #417 / Mar 20, 2009 2:39pm

    alex-and-r

    11 posts

    Try accessing http://www.your-site.com/backend/uri_permissions/ this is the built-in interface to deal with permissions. I think that’s what you looking for.

    Thank you for the reply. I’ve already solved the problem (partly by doing exactly what you said).

  • #418 / Mar 21, 2009 6:07pm

    RS71

    106 posts

    could somebody explain to me permissions vs. roles and give me some examples?

  • #419 / Mar 21, 2009 6:10pm

    RS71

    106 posts

    and the roles and parent roles if possible

    Thanks in advance.

  • #420 / Mar 21, 2009 7:06pm

    RS71

    106 posts

    Quick question:

    If I have performance in mind, I should use is_role instead of check_uri_permissions since it doesn’t use any queries yes?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases