php user authentication libraries / frameworks ... what are the options? [closed] php user authentication libraries / frameworks ... what are the options? [closed] codeigniter codeigniter

php user authentication libraries / frameworks ... what are the options? [closed]


I use Zend_Auth. But I work with Zend Framework in general. To what I've heard it integrates well with CI. With Zend_Auth I use a Db_Table Adapter and SHA1 with a global salt. That's enough for many purposes I think.


Looks like this could be exactly what you're looking for, if you want to get zend-auth working in codeigniter. Please update your question again if you find zend-auth & codeigniter to be a good mix..

I've personally found hacking dx_auth to be quite a pain, especially for its lack of documentation, and I'd love to give something else a shot if it sounds promising.


I've found dx_auth to be quite good in Codeigniter, and have used it before. It is certainly the most full featured authentication library for Codeigniter.

There were a few things i needed to do to change it, so I extended their User class with a few functions for my purposes (some of their functions don't do exactly what you might expect..). Here is a segment of some of the customizations I made:

     $CI = &get_instance();     $CI->load->model("dx_auth/users");     /**     * For most things, try and use the dx_auth models,      * because it's already done, and some stuff is more      * annoying to figure out than might be expected.     *     * For anything site-specific, use this model instead.     *     */     class UserModel extends Users {        /**        * Sometimes when dx_auth sucks, you have to compensate         * functions that return useful results.        *        * @param int $id id of user to check if banned        * @return int $banned returns the result (0 or 1)        */       public function is_banned($id) {            $query = "SELECT banned FROM users WHERE id=".(int)$id;            $result=$this->db->query($query);            $row = $result->row_array();            return $row['banned'];       }    }