You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 60 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - User can't login [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
stevenFr
Guest






PostPosted: Tue Feb 11, 2003 7:06 am Reply with quoteBack to top

Hi,

For those like me, who were looking a very long time for a fix of this weird login bug of users, here is an other thing they can try. The pb i found is in the Your_Account/index.php file, the function to look for is "function_login" (of course ...)

Here is the complete code of this function to replace index.php :


function login($uname, $lpass) {
global $setinfo, $user_prefix, $dbi, $module_name;
$result = sql_query("select pass, uid, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax from ".$user_prefix."_users where uname='$uname'", $dbi);
$setinfo = sql_fetch_array($result, $dbi);
echo $result;
if ((sql_num_rows($result, $dbi)==1) AND ($setinfo[1] != 1) AND ($setinfo[0] != "")) {
$dbpass=$setinfo[0];
$non_crypt_pass = $lpass;
$old_crypt_pass = crypt($pass,substr($dbpass,0,2));
$new_pass = md5($lpass);
if (($dbpass == $non_crypt_pass) OR ($dbpass == $old_crypt_pass)) {
sql_query("update ".$user_prefix."_users set pass='$new_pass' WHERE uname='$uname'", $dbi);
$result = sql_query("select pass from ".$user_prefix."_users where uname='$uname'", $dbi);
list($dbpass) = sql_fetch_row($result, $dbi);
}
if ($dbpass != $new_pass) {
Header("Location: modules.php?name=$module_name&stop=1");
return;
}
docookie($setinfo[1], $uname, $new_pass, $setinfo[2], $setinfo[3], $setinfo[4], $setinfo[5], $setinfo[6], $setinfo[7], $setinfo[8], $setinfo[9]);
Header("Location: modules.php?name=$module_name&op=userinfo&bypass=1&uname=$uname");
} else {
Header("Location: modules.php?name=$module_name&stop=1");
}
}


Worked for me, if that can be usefull for someone else. The brief explanation of that is when the request result is fetch into an array, apparently the name of each column is not filled correctly. To prevent this, it is better to replace each call to the array with a id number instead of the column name. It also had to be replaced in the routine which write the cookie. Just copy and past the code over and it should work.

If it worked for you, just post a message in here

Steven
Webmaster fr.simflight.com
Find all posts by Anonymous
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Tue Feb 11, 2003 7:14 am Reply with quoteBack to top

Seems like a good chance to remind users of Tom's bbtonuke port, if you don't upload all files included with the port you'll have this and other problems, not uploading the Your Account module included with the port will cause new users to not be able to register, not uploading the modules.php file included with the port will find your registered users not being able to login, the files included with the port are there for a reason so all of them must be uploaded, many just upload the Forums folder and then wonder why the site won't work as intended.

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Tue Feb 11, 2003 7:24 am Reply with quoteBack to top

chatserv wrote:
Seems like a good chance to remind users of Tom's bbtonuke port, if you don't upload all files included with the port you'll have this and other problems, not uploading the Your Account module included with the port will cause new users to not be able to register, not uploading the modules.php file included with the port will find your registered users not being able to login, the files included with the port are there for a reason so all of them must be uploaded, many just upload the Forums folder and then wonder why the site won't work as intended.


Man..I have seen that a MILLION times Confused
You preach it brother!

mikem
Find all posts by mikemView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Tue Feb 11, 2003 7:32 am Reply with quoteBack to top

Actually it was a recording Razz

No matter how many times i repeat it, new users keep making the same mistake Rolling Eyes

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
stevenFr
Guest






PostPosted: Tue Feb 11, 2003 8:54 am Reply with quoteBack to top

Hi,

Maybe i was not clear enough, was talking about the general login problem, not about forum pb. I even don't use it on my site.

Steven
Find all posts by Anonymous
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Tue Feb 11, 2003 9:07 am Reply with quoteBack to top

No stevenFr, i only posted what i did bacause it related to what you had posted, you wouldn't believe just how many people keep making this mistake.

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
stevenFr
Guest






PostPosted: Tue Feb 11, 2003 9:26 am Reply with quoteBack to top

Ok, to be more precise, two servers with exact same directory structures and files taken from the first server.
On Server 1 was working perfect, on server 2 was not working. There was no missing files or so compared to server 1.

Might be a difference of the SQL code base or PHP version, still looking into it.

So in here it was really a code and server behaviour.

Regards,

Steven
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Feb 11, 2003 11:21 am Reply with quoteBack to top

steven, if you'd taken time to learn something about the phpBB to nuke port, you'd know that there's a modification in the Your_account module that comes with the port so that it doesn't die when the Your_Account module suddenly finds that there's more fields in the users table than there is data to write to because of the port.

Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.604 Seconds - 193 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::