Code Monkey home page Code Monkey logo

ag-auth's People

Contributors

adamgriffiths avatar jeffreylo avatar kellasreeves avatar panega avatar paulyasi avatar salgua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ag-auth's Issues

Auth/Users

Codeigniter throws a usermodel not found error, but looking through the repo, I realize that it's not included with the package. Is this intentional?

Parameters in auth.php not being used

In config file (auth.php) you can set the names for your user tables:

$config['auth_user_table'] = 'users';
$config['auth_group_table'] = 'groups';

BUT in the MY_Controller.php the SQL sentences are written ignoring these parameters:

SELECT * FROM `users` WHERE ...

Solution:

1.- Add vars to class

var $auth_user_table;
var $auth_group_table;

2.- Load values in Application()

$this->auth_user_table = $this->config->item('auth_user_table');
$this->auth_group_table = $this->config->item('auth_group_table');

3.- Modifiy sql sentences

Change all sql sentences from this:

$query = $this->db->query("SELECT * FROM `users` WHERE `$auth_type` = '$str'");

to this:

$query = $this->db->query("SELECT * FROM `{$this->auth_user_table}` WHERE `$auth_type` = '$str'");

Not working under CI 2.02

I can't get this to work at all, I keep getting:

Fatal error: Class 'Application' not found in /Users/designermonkey/Projects/Chameleon/codeigniter/httpdocs/application/controllers/admin/admin.php on line 4

Not working properly: logged_in()

Thanks for porting this over to CI2, really looking forward to this working properly.

I've had to do a load of changes to make this work properly under CI2, which I will send as a pull request for you when I test them more.

I've run into a big problem that I can't fix, and need your input into it. Under the admin controller, there is a check being performed to see if a user is logged in, which currently always returns false, irrespective of whether the session is correctly set.

I am finding though that there are too many sessions being created, and only one of them has the correct details for this code, but it never seems to be the right one that is being checked.

Do you have any insight into this?

why meta redirect?

on line 96 it uses a meta refresh for the redirect. unless this is very clever for some reason I suggest it changed into a normal header location redirect.

infinite redirecting loop

The value of config['auth_login'] is used for both failed and successful logins.

So, if you try to access some controller without being authenticated for it , you're redirected to config['auth_login'], but naturally, you're not authenticated for that either, so it redirects you .. to config['auth_login']. and so forth.

insufficient group privileges / group_id issue

Noticed a bug in the libraries/Auth.php file, near line 82:

Reads:
$user_level = $this->CI->session->userdata('group');

When it should be:
$user_level = $this->CI->session->userdata('group_id');

As in the login() function in the same file you set the session variable as 'group_id', not 'group'

user_agent being truncated

in the sql dump you have: user_agent varchar(50)
however this will truncate some user_agents and you will not be able to validate login properly. please change this to something larger (255? 120? I don't know)

This was my first CodeIgnitor experience and I spent the last 2.5 hours tracking down your bugs. Totally not cool.

Expired Sessions

I frequently leave my computer on and happened to leave Firefox open with myself at the login screen for a very long time, so when I came back to working on things I put in the wrong information to begin with but when I did I got an error:

A PHP Error was encountered
Severity: Notice
Message: Undefined index: login_attempts
Filename: libraries/Auth.php
Line Number: 325

As best I could tell, this was due to not checking if the session existed or something. Anyways I thought I would share it.

Offline random.org PHP Notices

Other than the obvious not being able to get the random url, in the offline processing your line 361 has the following code which in itself produces an error.

[code] $token = โ€; [/code]

I fixed the issue using '' instead of the special character quotation.

Only reason I noticed the error is I am driving to Anaheim, CA for Blizzcon and working in the backseat off an AT&T Wireless card. Should produce similar results by gasp unplugging.

Users Table CI DB Prefix & Auth Library Config

File: /libraries/My_Controller.php
Lines: 80, 100, 112

All three lines bypass the CI dbprefix as well as the Auth Library $config['auth_user_table'] values in use of the table 'users'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.