Part of the EllisLab Network
   
50 of 58
50
DX Auth 1.0.6 (Authentication library)
Posted: 30 June 2009 09:12 AM   [ Ignore ]   [ # 491 ]  
Summer Student
Total Posts:  2
Joined  06-29-2009

u: admin
p: hello

Profile
 
 
Posted: 30 June 2009 09:37 AM   [ Ignore ]   [ # 492 ]  
Summer Student
Total Posts:  16
Joined  02-23-2009
danharper - 30 June 2009 09:12 AM

u: admin
p: hello

Thanks.

 Signature 

My Blog | Freelance Job

Profile
 
 
Posted: 30 June 2009 08:50 PM   [ Ignore ]   [ # 493 ]  
Summer Student
Avatar
Total Posts:  22
Joined  05-20-2009

I’m working through extending the Controller class to protect every page.  My_Contoller.php looks like this:

<?php

class Main extends Controller
{
   
function Main()
   
{
      parent
::Controller();
      
$this->load->library('DX_Auth');
      
$this->load->helper('url');
      
      if(
$this->dx_auth->is_logged_in() == FALSE)
      
{
         log_message
('debug', '"Main" Controller Initialized');
         
redirect('login', 'location');

      
}
   }

}
?>

This is working as far as requiring one to be logged in.  But what I would like it to do is return to the URI that was requested when it interrupted.  Is there a better way of handling this?  Any suggestions?

Profile
 
 
Posted: 17 July 2009 11:46 AM   [ Ignore ]   [ # 494 ]  
Summer Student
Avatar
Total Posts:  22
Joined  05-20-2009

I have another question.  When the “Remember Me” is checked and autologin is fired, I don’t get a log in Event.  I think I would like to modify the autologin to fire an event, but unsure of the best way to handle it.  Any suggestions?

Profile
 
 
Posted: 23 July 2009 01:14 AM   [ Ignore ]   [ # 495 ]  
Summer Student
Total Posts:  14
Joined  03-31-2008
North2Alaska - 30 June 2009 08:50 PM

I’m working through extending the Controller class to protect every page.

Not a bad idea…
But can’t you use check_uri_permissions() for this already?
Or is this different? smile

Profile
 
 
Posted: 23 July 2009 01:21 AM   [ Ignore ]   [ # 496 ]  
Summer Student
Total Posts:  14
Joined  03-31-2008
nelkindotnet - 30 April 2009 11:03 AM

Hi.  So I got your authentication to work flawlessly and it is awesome!  I got a quick question though…  Once my user logs in I redirect them to their “Dashboard” page.  From here I have a link for multiple pages.  When they click on a link it then redirects them back to the login page.  Basically in my controller I have…

$this->load->library(‘DX_Auth’);
$this->dx_auth->check_uri_permissions();

...located on all pages that I want locked down.  Am I not doing proper session/permission checking?  Any help would be greatly appreciated.
Cheers,
[]D[]\[]

Probably a bit late, but did you actually set up the URI Permissions for the role of those users? smile

Profile
 
 
Posted: 23 July 2009 04:33 AM   [ Ignore ]   [ # 497 ]  
Summer Student
Avatar
Total Posts:  22
Joined  05-20-2009
Caelis - 23 July 2009 01:14 AM

Not a bad idea…
But can’t you use check_uri_permissions() for this already?
Or is this different? smile

I looked at that breifly, but I hadn’t got as far as setting up roles and permissions yet and thought this wouldn’t work.  I will dig into more, though.  Thanks for the suggestion.

Profile
 
 
Posted: 23 July 2009 05:25 AM   [ Ignore ]   [ # 498 ]  
Summer Student
Total Posts:  14
Joined  03-31-2008
North2Alaska - 23 July 2009 04:33 AM
Caelis - 23 July 2009 01:14 AM

Not a bad idea…
But can’t you use check_uri_permissions() for this already?
Or is this different? smile

I looked at that breifly, but I hadn’t got as far as setting up roles and permissions yet and thought this wouldn’t work.  I will dig into more, though.  Thanks for the suggestion.

I’m not saying it is not a good idea to not extend the controller.
I even thought at first that your function might even be better for controlling a controller.

But in hindsight, uri_permissions offer you the flexibility to predefine which controllers to protect (via check_uri_permissions for either the complete controller or just a function within a controller) and to actually assign these permissions to the different roles and change them at runtime at will. smile

I’m getting more and more fan of DX Auth because it’s way easier to understand then for instance freakauth and I even started adding some own function to the library smile

Profile
 
 
Posted: 23 July 2009 06:44 AM   [ Ignore ]   [ # 499 ]  
Summer Student
Avatar
Total Posts:  9
Joined  01-16-2009

Hi i am working on a social networking site. I want to add mini ajax chat so i want to learn users online status.

How can i get users online status ?

 Signature 

I am sory for my poor english.

Profile
 
 
Posted: 23 July 2009 06:57 AM   [ Ignore ]   [ # 500 ]  
Summer Student
Total Posts:  14
Joined  03-31-2008

$this->dx_auth->is_logged_in()

Profile
 
 
   
50 of 58
50
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 10:15 AM
Total Registered Members: 119467 Total Logged-in Users: 24
Total Topics: 125732 Total Anonymous Users: 1
Total Replies: 661656 Total Guests: 364
Total Posts: 787388    
Members ( View Memberlist )