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]
  • #541 / Nov 21, 2009 10:45am

    674DBK

    13 posts

    hi..

    first sorry for my poor english.
    i am newbie ci..

    i got problem with this auth..

    seems like no table select to insert sql query.. please help me..

    A Database Error Occurred

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES (‘c1592cc94bc21’ at line 1

    INSERT INTO ` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES (‘c1592cc94bc21b1d5257338008004132’, ‘0.0.0.0’, ‘Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1’, 1258814532)

  • #542 / Nov 21, 2009 12:14pm

    eric cumbee

    31 posts

    did you create that table in your database?

  • #543 / Nov 21, 2009 12:22pm

    674DBK

    13 posts

    yes.. im already import database from scheme.sql that provide with DX Auth zip file.

    database created :

    ci_sessions
    login_attempts
    roles
    permissions
    users
    user_autologin
    user_profile
    user_temp

    this seems like .. insert sql query not select `ci_sessions` table. i think so.
    please help me…

    NO TABLE SELECTED 🐛
    * suppose table ci_sessions selected..

    A Database Error Occurred

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES (‘14aeba5f3b5c8’ at line 1

    INSERT INTO ` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES (‘14aeba5f3b5c8636f1000f19e1bcaf8e’, ‘127.0.0.1’, ‘Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1’, 1258820991)

  • #544 / Nov 23, 2009 4:21am

    ppardo

    4 posts

    Is anyone awarded of IE8 “logout” bug? I’ve been using the library for a while and my application is in production now, suddenly IE8 have starting to log itself out from the application and the only reference I have found about it is a complaint of some people in this forum, but no solution is mentioned. As i said my app is on production and nobody have tell me anything about but they will sooner or later; I’d like to be prepared before it happens, so please if anyone have notice this and solved it please post the solution.

    Thanks in advance.

  • #545 / Dec 25, 2009 9:15pm

    Excellent library, tried it out in a project!

    Just some suggestions :
    - Add the User Guide to the download package, some people like to have offline docs (I found the link over the forums, but adding it to the download zip will be helpful)
    - Make it more clear in Getting started and Install guide what are the default users registered, that would have save me 20 minutes of time to find them
    - Is there a SVN or GIT available? that would be cool

  • #546 / Dec 26, 2009 9:07pm

    I must be stupid but I don’t find the way to get the user profile data, nothing about that in the user guide? Is it unfinished work?

    Can you provide us with a few examples about it?

  • #547 / Jan 13, 2010 7:56am

    123wesweat

    107 posts

    @too pixel,

    did you find a way to get user_profile data???

  • #548 / Jan 13, 2010 8:16am

    There is a User model but it’s really bloated. Seems there’s no way with the base library to get user details. I really wonder what the developer had in mind to follow what he started to do, but seems he don’t want maintain this project anymore (which is really sad…)

  • #549 / Jan 13, 2010 2:59pm

    123wesweat

    107 posts

    ok i think i have something to work with

    function index() {
             $this->load->model('dx_auth/user_profile');
                //here our profile
            $user_id = "3";
            $fields = "country";
                    $row = $this->user_profile->get_profile('3')->result();
                    echo $row[0]->website.'<br>';
                    $test = $this->user_profile->get_profile_field('3', 'country')->result();
                    echo $test[0]->country;
                    //print_r($test);
            //print_r($row);
    
        }
    
    /* End of file myaccount.php */
    /* Location: ./application/controllers/myaccount.php */

    but i don’t get the difference between get_profile and get_profile_field

    ps: tx, i am going to take look into User model (where do i find this one?? or do you mean class User_Profile )

  • #550 / Jan 13, 2010 3:10pm

    Yes I was meaning User_Profile.
    Problem in your code above is that it will make an additional query to get the user profile, when that can be done in 1 Joined query. There is a lot to rewrite in DX_auth to make something cleaner. If you come to something that can be interesting. Let us know.

  • #551 / Jan 13, 2010 3:19pm

    123wesweat

    107 posts

    sorry, i don’t get your point.

    1/ where do i make an additional query??
    2/ object is a bit new to me as i am more used to an array. Why must i use [0] i missed that one when i first made the foreach?

    I think i go further with this as i need some simple profile info stored.

    tx for taking the time

  • #552 / Jan 13, 2010 3:22pm

    Let’s say you want ot list your users by username with the country near the username (which is a very common task), DX_Auth make you do 1 query to get the username + 1 query for the country, which could be done in 1 joined query. Of course you can do that with DX_Auth but that will make you rewrite some bits of code.

  • #553 / Jan 14, 2010 5:39am

    123wesweat

    107 posts

    aha, you mean DX_auth hasn’t provide us with a function which ‘joins’ the users table and user_profile table,

    In general would you put methods like

    function myFavorites()
    function lastViewed()

    in the user_profile model??

    Or should i make a user_profile_features model which extends de user_profile model (or model)???

    Do you know if an function user_loggedin() exsits??

  • #554 / Jan 14, 2010 10:50am

    As those functions are user related I would add them to the user_profile model, but that depends also about the conception of your application, difficult to tell.

    In DX Auth there is for sure a method to check if user logged in. Read the manual.

  • #555 / Jan 19, 2010 11:02pm

    jaswinder_rana

    89 posts

    I downloaded this library today. I changed all the configs to move all views/controllers in different directories.

    Everything was changeable from config file except register_recpatcha_form in controllers/auth.php at line 245 ($this->load->view(‘auth/register_recaptcha_form’);)

    This should also be in config area.

    Thanks

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

ExpressionEngine News!

#eecms, #events, #releases