Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Auth

[eluser]Mat-Moo[/eluser]
COMMENTS! No need to go that far Smile

However I've put the new library in cleared all my cookies
Code:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/printfet/public_html/test/system/application/libraries/auth.php:2)

Filename: libraries/Session.php

Line Number: 662
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/printfet/public_html/test/system/application/libraries/auth.php:2)

Filename: helpers/url_helper.php

Line Number: 541
Although maybe I'm being a div because I've just realised that I'm not using database for sessions :ahhh:

[eluser]davidbehler[/eluser]
I think my library doesn't care wether you use database or cookies for session storage. All I'm doing is tell the session library to set the cookie again if the remember me option is set.

Code:
headers already sent by (output started at /home/printfet/public_html/test/system/application/libraries/auth.php:2)
Does this mean it's caused by line 2 of the auth library? That's a blank line...mh...Have you tried removing that one?

[eluser]Mat-Moo[/eluser]
(slightly embarrassed) I added some comments at the top (time date link library name etc) and managed to have a blank line before the <?php - Looks like it's ok again!

[eluser]davidbehler[/eluser]
Haha, glad you found the error Wink

[eluser]davidbehler[/eluser]
Ok, I just made a small update to the library:
1. It now uses my password helper for password generating
2. I added some infos to the file like name, version, link and so on

Download link is the same as ussual: http://www.davidbehler.de/download/auth.rar

[eluser]shahriat[/eluser]
Hi, I have just one table like this

CREATE TABLE IF NOT EXISTS `hmcms_user` (
`user_id` int(12) NOT NULL AUTO_INCREMENT,
`usertype` varchar(30) NOT NULL,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`order` int(12) NOT NULL,
`modified_date` datetime NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;

I want to use this auth library , Please let me know how can i integrate this library with my structure.

--
Thanx

[eluser]davidbehler[/eluser]
Have a look at the user guide, it got everything you need Smile

But as kind as I am, I will tell you what to do:

Create 'config/auth.php' file and set up your configiguration:
Code:
$config['database_config'] = array(
  'user_table' => array(
    'name' => 'hmcms_user',
    'user_primary_key_column' => 'user_id',
    'user_primary_key_column_is_auto_increment' => TRUE,
    'user_identifier_column' => 'username',
    'user_password_column' => 'password',
    'user_salt_column' => '',
    'group_foreign_key_column' => ''
  );
$config['encryption_order'] = '%password%';
$config['use_database_user_groups'] = FALSE;
$config['use_database_rights'] = FALSE;

That's about it. Now all you have to do is setup the input_config according the user guide and your form setup.

Hope that helps Smile

[eluser]BDKR[/eluser]
[quote author="waldmeister" date="1226291014"]Yes, yes, I know. There are quite a few authentication libraries around but I just can't deny you my own little creation!

The name "MeNeedz Auth" might be kinda strange to you (it derives from the working title of my current project) but don't let that stop you from testing it!

So, what does my library do?
It handles the process of login and can be used to restrict access to a specific user group.

But that's what most of the libraries posted here can do. How's yours different?
I think my library is different because it does not require a certain database layout or a database at all. You can choose to use salting or not (and how you want to combine the salt with the passwort), tell the library what encryption to use (md5 and sha so far) or even don't use a database at all and only use a certain identifier/password combination.

Identifier? Yes! You are not restricted to use the username and a password for login, you can use what ever identifier you want to use. E-mail? Full name? A number? What ever you want!

Does the library have any requirements at all? Yes, sadly it does. You need a library called "session" (e.g. the standard codeigniter session library) to handle the session.

How can I tell the library how I want my users to be authed?
When loading the library you can either use a config array as a parameter or create a config file "auth.php" in your config folder where you can set all the parameters. What parameters can be used can be seen in the library. If you don't want to use the config array or the config file then you can just go ahead and change the variables in the library.

Ok. Sounds great! Where can I get that wonderful thing?
Just grab it from here: --&gt; click me <--
View the user guide here (also included in the download: --&gt; click me <--

Latest Update on 18-11-2008
Version 1.7:
- Added a new function that let's you set a new password for a given user

I am really looking forward to your comments and your suggestions on how to improve the library!

Greets,
waldmeister
[/quote]

Good stuff this mate! After reading 5 pages into this thread I think I'm sold.

Cheers

[eluser]BDKR[/eluser]
Something that may be a good idea some kind of error reporting that tells why a registration attempt fails.At this point, it searches to see if a given user_name already exists. If it finds that the user name is already there, it simply returns false!

++Ungood that mate!

I'll prolly do what I did on other sites and just check for pre-existing user names via AJAX.

Anyway, this is not to come down on you or anything. NOT AL ALL!!!! I'm still very appreciative of this work and the fact that you've made it available for all of us. Just thought I would let you know my experience thus far.

Thanx a million! :-)

BDKR

[eluser]meteor[/eluser]
Hi,
Just been looking at some functions of the Auth library, especially on the register() one.
I'm not sure whether I undersand it right? Does it make validation on the values passed from the registartion form ???
I'm asking, because it seems to me, that the code of this as well as some other functions seems to be tightly coupled with views (I know there are options to customize every single detail). Wouldn't it be wiser to let people choose validation methods(might help in optimizing code too) and separate view variables(or even get rid of them altogether). Sorry, if I'm too picky, but sometimes I just want to run some PHPUnit tests on libraries which I will use for my project. I'm used to test libs with phpunit and models with simpletest. How do you test your code ? I really like the ideas and solutions you provide Smile) but have really hard time testing them sometimes Wink))

In general my impression is that your libraries are like thorough solutions as opposed to simple decoupled libraries. This is by no means bad ... just makes testing a bit hard. Sorry, I might be too test obsessed Wink))

regards




Theme © iAndrew 2016 - Forum software by © MyBB