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? 😊
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
December 01, 2008 6:14am
Subscribe [160]#496 / Jul 23, 2009 4:14am
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? 😊
#497 / Jul 23, 2009 4:21am
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? 😊
#498 / Jul 23, 2009 7:33am
Not a bad idea…
But can’t you use check_uri_permissions() for this already?
Or is this different? 😊
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.
#499 / Jul 23, 2009 8:25am
Not a bad idea…
But can’t you use check_uri_permissions() for this already?
Or is this different? 😊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. 😊
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 😊
#500 / Jul 23, 2009 9:44am
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 ?
#501 / Jul 23, 2009 9:57am
$this->dx_auth->is_logged_in()
#502 / Jul 23, 2009 10:13am
I think i coulnt explain what i want. Lets say my username ApranaxFortress and i have friends on the website i want to get my friends online status. I want to see online friend in my contact list.
#503 / Jul 23, 2009 1:24pm
EDIT
Apologies for not being clear enough. I realise that while creating a new user, DX_Auth checks whether the username/email address already exists in the system in a non-case sensitive manner. During the login process however, case matters.
I’ve dived into the library file, found the code I was looking for and fixed it.
Thanks!
——- Original Question below———
Hi,
I was wondering if it’s possible to make the username case-insensitive so that usernames abc and ABC are the same.
cheers,
Naren
#504 / Jul 24, 2009 2:44am
Hi,
I’ve been trying to figure this out for the last hour, but I couldn’t seem to get it.
I deleted the “user_profiles” table and when I try to activate an account via the activation link, I get this error.
———————————————————————————
A Database Error Occurred
Error Number: 1146
Table ‘domain.user_profile’ doesn’t exist
INSERT INTO `user_profile` (`user_id`) VALUES (22)
———————————————————————————
Now, I know what that means, but I can’t seem to find which file I need to edit to remove that MySQL insert. I want to replace it with pending administration activation.
Does anyone know in which file I can edit this?
Thank you in advance.
#505 / Jul 28, 2009 6:48am
@coreg
If you just want to disable automatic activation, DX_Auth’s configuration allows you to do that.
You can then see a list of unactivated users at backend/unactivated_users and choose to activate or delete them from the temp file.
If you’re trying to do something else, perhaps you could try reframing the question.
cheers,
naren
#506 / Jul 28, 2009 7:37am
The profile table is related to the users table so when you delete the profile table you run into problems.Dont delete the profile table until you figure out how to edit,delete or even update the profile table.
#507 / Jul 28, 2009 7:24pm
Hi guys
I’m having a little design problem within a Dx view file
In the example view file: system/application/views/auth/login_form.php there’s a line (line 34)
<?php echo $this->dx_auth->get_auth_error(); ?>This line makes the view to show an error message in case anything goes wrong. I’ve added a
to the line, with a red backgroung, and this makes the red background to show always. The get_auth_error returns always an error, so I can’t check like this (pseudocode):
if get_auth_error != 0 then show the error, else we keep this hiddenHope you’ve understood my question
#508 / Jul 29, 2009 4:34am
You could run a simple check:
$error = trim($this->dx_auth->get_auth_error());
echo (strlen($error) > 0) ? "$error" : "";cheers,
naren
#509 / Jul 30, 2009 4:06am
Can we have user guide as downloadable ?
#510 / Jul 30, 2009 8:55am
A downloadable manual isn’t a bad idea—ala Datamapper/DMZ.
naren