EllisLab text mark
Advanced Search
9 of 10
9
   
The Authentication Library 1.0.6
Posted: 30 September 2011 06:20 AM   [ Ignore ]   [ # 121 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

Depending on the server you may need to use all lowercase filenames!

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 03 October 2011 03:26 PM   [ Ignore ]   [ # 122 ]   [ Rating: 0 ]
Joined: 2010-12-13
3 posts

Same problem with login always showing login-form, HOWEVER I am actually never logged in (as others claim to be). I’m running CI 2.0.3 and ag_auth 2.0.5.
The call to logged_in() (in admin controller) always returns false and the session is always WITHOUT any userdata when I dump it in admin/index (session->all_userdata()). If I turn on sess_use_database I see that every login-attempt writes two rows to ci_sessions table where the latter is without userdata whereas the first one has userdata - i.o.w. the session seems to be overwritten. What’s going on?

 
Posted: 03 October 2011 04:11 PM   [ Ignore ]   [ # 123 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

Adam,

You have a bug in the sql_dump for AG_Auth!

The Session user_agent is now varchar(120) not (50)

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 03 October 2011 04:14 PM   [ Ignore ]   [ # 124 ]   [ Rating: 0 ]
Joined: 2010-12-13
3 posts

Ahhhhhhhhh

 
Posted: 03 October 2011 04:54 PM   [ Ignore ]   [ # 125 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

I’ll install this tonight and take a look at what’s going on!

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 03 October 2011 04:57 PM   [ Ignore ]   [ # 126 ]   [ Rating: 0 ]
Joined: 2010-12-13
3 posts

Sorry, my previous post was actually a sigh of relief. The length of user_agent (varchar 120) was the culprit. The sessions never matched because of this so a new session was created on every page load.

 
Posted: 03 October 2011 05:22 PM   [ Ignore ]   [ # 127 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

Here is the new sql_dump for AG_Auth

-- --------------------------------------------------------

--
-- 
Table structure for table `ci_sessions`
--

CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `
session_id`    varchar(40)           NOT NULL default '0',
  `
ip_address`    varchar(16)           NOT NULL default '0',
  `
user_agent`    varchar(120)          NOT NULL,
  `
last_activityint(10)      unsigned NOT NULL default '0',
  `
user_data`     text                  NOT NULL,
  
PRIMARY KEY  (`session_id`)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 
Table structure for table `groups`
--

CREATE TABLE IF NOT EXISTS `groups` (
  `
id`          int(11)      NOT NULL,
  `
title`       varchar(20)  NOT NULL default '',
  `
descriptionvarchar(100NOT NULL default '',
  
PRIMARY KEY  (`id`)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 
Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `
id`         int(11)      NOT NULL auto_increment,
  `
username`   varchar(255NOT NULL,
  `
email`      varchar(255NOT NULL,
  `
password`   varchar(255NOT NULL,
  `
group_id`   int(11)      NOT NULL default '100',
  `
token`      varchar(255NOT NULL,
  `
identifiervarchar(255NOT NULL,
  
PRIMARY KEY  (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8

NOTE: That the default charset shoud also be utf8 and not latin1

 

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 05 October 2011 02:20 AM   [ Ignore ]   [ # 128 ]   [ Rating: 0 ]
Joined: 2011-09-22
27 posts

Welcome to http://www.1buycart.com/

 
Posted: 09 November 2011 11:48 AM   [ Ignore ]   [ # 129 ]   [ Rating: 0 ]
Joined: 2011-10-07
1 posts

I got 404 in any: /register - /login… I’ve install Auth from spark but doesn’t work… My CI is installed correctly, and some other libraries works fine.
I use a vhost and remove the ‘index.php’, so when I put http://mysite.local/register or http://mysite.local/login, I get the 404.
Other my controllers works fine.

How can I make your lib work?
It’s seems very intresting…but id I can’t try… :(

 
Posted: 16 December 2011 10:45 AM   [ Ignore ]   [ # 130 ]   [ Rating: 0 ]
Joined: 2011-12-16
1 posts

Can’t get AG_auth to work!!!

After a fresh install of CI (2.1.0) I just installed AG_auth (2.0.5) using Sparks, followed all the instructions, but I get a 404 when going to mydomain/index.php/register or mydomain/index.php/admin/register.

Does anyone has a clue, is this library working for anyone else?

PS: I have activerecord (0.0.2) installed as well, if that makes any difference.

 
Posted: 18 December 2011 10:12 AM   [ Ignore ]   [ # 131 ]   [ Rating: 0 ]
Joined: 2011-12-18
1 posts

@josefo, @aere ==> have you add the redirect from /register to /admin/admin/register in the file /config/routes.php? And added the MY_Controller.php in /application/core/ ?

I have a different problem registering or logging in, when i submit the register/login form i only see a white page.. Any idea?

I’m on CI 2.0.3 + AG Auth 2.0.5

 
Posted: 12 March 2012 09:28 AM   [ Ignore ]   [ # 132 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-20
63 posts

I’m trying to understand the connection between the groups table and the auth_groups array in the config file.  It seems I should need one or the other, but not both. 

Also, how can I assign a user to multiple groups?

I’m using CI 2.1.0 and v2.0.0 of The Authentication Library

 
Posted: 12 March 2012 10:24 AM   [ Ignore ]   [ # 133 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

You would need to add a new table user_groups

-- ------------------------------------------------------------------------

--
-- 
Table structure for table 'user_groups'
--

DROP TABLE IF EXISTS `user_groups`;

CREATE TABLE `user_groups` (
  `
id`       bigint(11unsigned NOT NULL  AUTO_INCREMENT,
  `
user_id`  bigint(11unsigned NOT NULL,
  `
group_idbigint(11unsigned NOT NULL,
  
PRIMARY KEY (`id`)
ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

 

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 12 March 2012 10:49 AM   [ Ignore ]   [ # 134 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-20
63 posts

Yes, of course.  I should have thought of that.  Doh! 

So, what is the relationship between the array in the config file and the table(s)?

 
Posted: 29 March 2012 01:56 AM   [ Ignore ]   [ # 135 ]   [ Rating: 0 ]
Joined: 2012-03-29
2 posts

I have what I think is a simplw question.  I have installed AG Auth, I can show the login form on any view page, but I can’t actually log in.  It’s as if the form doesn’t have any functionality unless it is in the actual auth/pages/login page.  Here is my Controller.

<?php

class Pages extends Application
{
public function __construct()
{
  parent::__construct();
 
 
 
}

public function login()
{
$this->ag_auth->login(‘user/dashboard’);
// user/dashboard is a made up URI string
}






public function view($page = ‘home’)
{
 
if ( ! file_exists(‘application/views/pages/’.$page.’.php’))
{
  // Whoops, we don’t have a page for that!
  show_404();
}

$data[‘title’] = ucfirst($page); // Capitalize the first letter

$this->load->view(‘templates/header’, $data);
$this->load->view(‘pages/’.$page, $data);
$this->load->view(‘templates/footer’, $data);

}




}

/* End of file: home.php */
/* Location: application/controllers/home.php */


then in the view I use the login form code.  Any help would be great.

 

 

 
9 of 10
9