|
Martin Samler - 2005-01-17 22:24:16
This seems like a very useful class. One problem:
When user data are updated, an error occurs if the user hits update twice:
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 6 in .../classes/access_user/access_user_class.php on line 169
This repeats for lines 170-172.
Not a huge problem, but not very pretty either :)
By the way, the line
$PHP_SELF = $_SERVER['PHP_SELF'];
seems to be missing in register.php ?
Thanks for saving me many hours of programming!
Olaf Lederer - 2005-01-17 22:52:58 - In reply to message 1 from Martin Samler
Hello,
Do you use the latest version? (never noticed the problem)
The server variables will be replaced next time, thanks.
Please post again if the problen still exist.
Olaf
Martin Samler - 2005-01-17 23:57:41 - In reply to message 2 from Olaf Lederer
Yes, I am using version 1.60
Another thing:
I need to distinguish between user types and assign priviliges accordingly. F.ex. types 'user', 'power user' and 'administrator'.
Any thoughts of yours to point me in the right direction? I am relatively new to php, so any detailled hints would be greatly appreciated.
Maybe you will add that functionality in the future?
Best regards,
Martin
Olaf Lederer - 2005-01-18 07:38:32 - In reply to message 3 from Martin Samler
Hallo,
Access levels are on the developement list.
In the meantime, use the extrainfo field for diff. levels.
After this you can put this field inside an if clause and redirect if the level is not reached.
Later there have to be an admin panel to change the level for existing users.
(but this is what i want to do later)
Olaf
Martin Samler - 2005-01-18 16:28:09 - In reply to message 2 from Olaf Lederer
Olaf,
the above mentioned error only occurs when the password is changed and 'Update' is hit twice.
Just for clarification.
Olaf Lederer - 2005-01-18 22:24:50 - In reply to message 5 from Martin Samler
Yes, it seems that a variable gets empty...
Thanks I will fix this next.
Tom - 2005-02-23 11:54:13 - In reply to message 1 from Martin Samler
Hello,
after hitting updating, it is enough to change to a other page and return to the update page again to get the errors:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in C:\Apache\Apache2\htdocs\AOD\classes\access_user\access_user_class.php on line 175
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in C:\Apache\Apache2\htdocs\AOD\classes\access_user\access_user_class.php on line 176
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in C:\Apache\Apache2\htdocs\AOD\classes\access_user\access_user_class.php on line 177
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in C:\Apache\Apache2\htdocs\AOD\classes\access_user\access_user_class.php on line 178
Best Regards,
Jonny ; )
Tom - 2005-02-23 11:59:13 - In reply to message 7 from Tom
Correction: Only when password is updated as discussed above.
but an other update issue: Seems as the info variable is misused - every login it is resetted to actual date and time by function reg_visit().
Why do you so?
br,
Thomas
Tom - 2005-02-23 11:59:23 - In reply to message 7 from Tom
Correction: Only when password is updated as discussed above.
but an other update issue: Seems as the info variable is misused - every login it is resetted to actual date and time by function reg_visit().
Why do you so?
br,
Thomas
Olaf Lederer - 2005-02-23 20:00:26 - In reply to message 9 from Tom
Take a look at this method:
function reg_visit($login, $pass) {
$visit_sql = sprintf("UPDATE users SET extra_info = '%s' WHERE login = '%s' AND pw = '%s'", date("Y-m-d H:i:s"), $login, md5($pass));
mysql_query($visit_sql);
}
If you don't like to register the last visit then disable the count_visit variable.
|