PHP Classes

login.php problem

Recommend this page to a friend!

      Access user Class  >  All threads  >  login.php problem  >  (Un) Subscribe thread alerts  
Subject:login.php problem
Summary:Login and/or password did not match to the database
Messages:18
Author:Martin-Rabaud
Date:2005-09-09 01:08:46
Update:2005-09-17 14:03:01
 
  1 - 10   11 - 18  

  1. login.php problem   Reply   Report abuse  
Picture of Martin-Rabaud Martin-Rabaud - 2005-09-09 01:08:46
I tried 2 login/password, but I get the same message after registration/login... Amazingly, when I delete a user, the first new id is still id=1... It's not the usual MySql behaviour, that creates new ids after the deleted ones.

  2. Re: login.php problem   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-09-09 06:06:47 - In reply to message 1 from Martin-Rabaud
Yes it's strange the auto_increment attribute must raise the id automaticly...
What kind of "same message" do you mean?

Is there are "live" example you can show us?

  3. Re: login.php problem   Reply   Report abuse  
Picture of Martin-Rabaud Martin-Rabaud - 2005-09-09 16:36:07 - In reply to message 2 from Olaf Lederer
Hi,

"Same message" refers to the topic title ("Login and/or password did not match to the database").

My test example here : http://www.editionweb.org/test/utilisateurs/example.php.

And here a simple test page on users table : http://www.editionweb.org/test/utilisateurs/utils/manips_base.php. The 3 links mean :
- reload start page (witthout GETs)
- delete all users
- list the users

Thank you for your answer,

Bernard

  4. Re: login.php problem   Reply   Report abuse  
Picture of Martin-Rabaud Martin-Rabaud - 2005-09-09 17:16:02 - In reply to message 3 from Martin-Rabaud
The auto_increment problem occurs only if all users have been deleted. Then the first id begins with 1 again. I guess it's a common MySql feature, I ignored.

  5. Re: login.php problem   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-09-09 19:53:37 - In reply to message 3 from Martin-Rabaud
Hello,

I don't no what you have done, but try again the example files like in the original and learn how it have to work. The first mail after registration shows me that you're doing somthing wrong.

  6. Re: login.php problem   Reply   Report abuse  
Picture of greg scragg greg scragg - 2005-09-14 03:33:42 - In reply to message 5 from Olaf Lederer
I have exactly the same problem:

I set up the two data base tables; tried to register first user; data appeared in the table correctly; received email telling me to follow the link... all good so far
*but*
link takes me to a log in page. if I enter the user data I get error messge #10 (Login and/or password did not match to the database). I tried this with two different dummy users with the same result both times.

I also note that although the link in the email is to
/classes/access_user/admin_user.php
the page that appears is
/classes/access_user/login.php
I don't see anything in the former that auto redirects me to the latter


version is: Access_user Class ver. 1.84 (downloaded about a week ago)

thanx for any help

  7. Re: login.php problem   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-09-14 05:40:02 - In reply to message 6 from greg scragg
...check this code inside the login script:

if (isset($_GET['activate']) && isset($_GET['ident'])) { // this two variables are required for activating/updating the account/password
//$my_access->auto_activation = false; // use this (true/false) to stop the automatic activation
$my_access->activate_account($_GET['activate'], $_GET['ident']); // the activation method
}

if auto_activation is set to false you get the message that the admin will preview your account in this case the admin will get a reminder mail. Then the account must be activated via the admin_user.php file.

If you do nothing with the code above and you have to change the activation inside the class.

  8. Re: login.php problem   Reply   Report abuse  
Picture of greg scragg greg scragg - 2005-09-14 13:09:43 - In reply to message 7 from Olaf Lederer
olof
thanx for the quick reply... alas I think it leaves me more confused than when I started.

I found the line you referred to in the login script. But that leaves me with even more questions:

1. what values should I have for those two variables($_GET['activate'] and $_GET['ident']), and where should they be set. I note that there is no query string (the full URL as displayed for the page is http://www.thedancegypsy.com/classes/access_user/login.php, so no query string and therefore no $_GET values).
2. how did I get to that line (in fact how did I get to the login script). The email link looks like it should take me to the admin_user script: http://www.thedancegypsy.com/classes/access_user/admin_user.php?login_id=4 [which makes no direct mention of login, activate or ident.
3. The user is in the data base but I note that the 'active' field is set to 'n':
[4 scragg3 a14609c9002aa6d1b4302a4f48133d31 scragg test [email protected] 1 n]
(note that I have now tried 4 users with the same result each time)
4. auto_activation appears to be set true, and it doesn't give the 'preview' message you refer to.
5. why does the email link specify the admin page. doesn't appear to be a place that new users should be going routinely

thanx again for any help

  9. Re: login.php problem   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-09-14 15:05:35 - In reply to message 8 from greg scragg
this are a lot of questions without knowing what you have changed.

All links works well in the original files. Maybe you can start with them and place my examples files on a server and then tell me what you want to do (before you change something).

gr. Olaf

  10. Re: login.php problem   Reply   Report abuse  
Picture of greg scragg greg scragg - 2005-09-14 15:14:45 - In reply to message 9 from Olaf Lederer
i don't think I changed anything (except the lines in the config file that say things like "enter your DB table name here") [e.g.
define("DB_NAME", "scragg5_contact"); ]

right now I am just trying to get your version to work on my machine.

I'm now wondering from your original instructions if perhaps the very first user must be the same name as the system administrator, or somthing like that.

 
  1 - 10   11 - 18