coding it so you can not change pass if your username is

PHP coding talk.

Moderator: Moderators

coding it so you can not change pass if your username is

Postby Greg on Wed Jan 05, 2005 6:25 pm

Hey,

How would I do it so that the person with the username Guest (is a proper member o ) can not change their password.

I have been using

Code: Select all
if (( !$userdata['session_logged_in'] && $mode == 'editprofile' ) || strtoupper($userdata['username']) == 'Guest' )


instead of
Code: Select all
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )


And i can change the password.

Any ideas whats up?
Could it be because of the username Guest

Greg[/code]
User avatar
Greg
Registered User
Registered User
 
Posts: 651
Joined: Wed Jul 07, 2004 3:20 pm
Location: Yorkshire, United Kingdom

Postby UseLess on Wed Jan 05, 2005 6:53 pm

Greetings,

strtoupper .... therefore 'Guest' is not all in uppercase however 'GUEST' is...
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Greg on Wed Jan 05, 2005 8:28 pm

Thanks,

Greg
User avatar
Greg
Registered User
Registered User
 
Posts: 651
Joined: Wed Jul 07, 2004 3:20 pm
Location: Yorkshire, United Kingdom

Postby shorty114 on Sat Jan 08, 2005 1:17 am

i believe you want ucfirst().
shorty114
Registered User
Registered User
 
Posts: 99
Joined: Wed Dec 15, 2004 10:45 pm
Location: Lost...


Return to PHP Programming

Who is online

Users browsing this forum: No registered users and 1 guest