22, November 2008

Admin_User password bug in v1.82 - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Admin_User password bug in v1.82
« previous next »
Pages: [1] Print

Author Topic: Admin_User password bug in v1.82  (Read 811 times)
Atari ST fan
*
Posts: 8
64 credits
Members referred : 0


« on: Apr 24, 2006, 12:35:58 AM »

Hi -

First, great job on this coding. I first tried this out for my family website with ver 1.75. I wanted a simple security check for pages to help keep the riff raff out of personal photos or info. I modified that v1.75 installation into the v1.82 version when I found that you had added access levels. Great addition!

I just noticed the Admin_user page password update error I think you resolved in the 1.83 version. I just downloaded the v1.88 but can't see where anything has changed for this area. Is there a quick fix on the 1.82 version to enable password changes under the Admin_user page?

If going to v1.88 is the best solution is there a short list of files that actually need to change? I have edited many of the login and update pages with graphics and don't want to just copy over everything.


Thanks... Dan
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Apr 24, 2006, 01:47:24 AM »

Hello Dan,

I don't think that you have to change your files because all important updates are done in the class files. I'm not sure about the versions 1.7x but the latest versions have to work if you replace the class files.

What went wrong with the admin page? passwords? never heard about.. please tell me more about this error you get.


Last blog : Just a better Internet portal provided by Google
Atari ST fan
*
Posts: 8
64 credits
Members referred : 0


« Reply #2 on: Apr 24, 2006, 05:37:35 AM »

Thanks for the prompt reply.

Sorry, I assumed the error I was getting was the "small bug" referred to in the Changes.txt file for version 1.83.

When using the "admin_user" page to update users records - If I attempt to alter the password field in anyway I will get the "Database error, please try again!" message. The code catches the less than 4 character for password length check properly but if I try to change the password properly I will always get the "Database" error. All other fields (access level, email, active, etc.) update properly so long as I don't edit the password field. The function update_user_by_admin($new_level, $user_id, $def_pass, $new_email, $active, $confirmation = "no") seems to be the location of the error.

Thanks... Dan
   
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Apr 24, 2006, 09:13:36 AM »

...hm, you know the problem is already solved I can't say whats your problem here.

But we will give it a try, what happens If you update a record?

place an echo in front of this row of admin_user.php

Code:
$sql_compl = sprintf($sql, $this->table_name, $new_level, $new_email, $active, $user_id);


Last blog : Just a better Internet portal provided by Google
Atari ST fan
*
Posts: 8
64 credits
Members referred : 0


« Reply #4 on: Apr 24, 2006, 11:36:36 AM »

Hi Olaf -

Thanks for the assistance. I found it. Here is the line from my v.182 update_user_by_admin function causing the problem -

$sql .= ($def_pass != "") ? sprintf(", SET pw = '%s'", md5($def_pass)) : "";

After seeing the ECHO from the $sql_compl I noticed the extra SET showing up before pw =. I removed the "SET" from "SET pw =" and everything is working. I doubled checked your v1.88 code and there is no "SET pw =" just the "pw =".

Thanks very much... Dan
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Apr 24, 2006, 01:01:32 PM »

you're welcome, that was the small bug Wink


Last blog : Just a better Internet portal provided by Google
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2349
Tags : graphics email Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Admin_User password bug in v1.82
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 22, 2008, 10:41:41 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.741
Total Topics: 7.651
Total Members: 4.398
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: egseopro

35 Guests, 4 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.