CurtisH
Life Cycles Becoming CPU Cycles

Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI
|
Posted:
Thu Jul 15, 2004 1:28 pm |
|
BobMarion wrote: | In Friend Finder's modules/FriendFinder/index.php file find lines 699-702:Code: getusrinfo($user);
$result1 = sql_query("select ffusername,sex, birth, degree,oicq,selfintro,stapro,city,postcode,location, object, method, other, photo, keyword,time, click, song,film, marriage,tel,country,user_occ,havechild,wantchild,drink,smoke,race from ".$user_prefix."_user_profile1 where ffusername='$userinfo[username]'",$dbi);
$row = sql_fetch_array($result1, $dbi);
if (($userinfo[username] != $cookie[1]) AND ($userinfo[user_password] != $cookie[2])) {
| and change to:Code:cookiedecode($user);
getusrinfo($user);
$result1 = sql_query("select ffusername,sex, birth, degree,oicq,selfintro,stapro,city,postcode,location, object, method, other, photo, keyword,time, click, song,film, marriage,tel,country,user_occ,havechild,wantchild,drink,smoke,race from ".$user_prefix."_user_profile1 where ffusername='$userinfo[username]'",$dbi);
$row = sql_fetch_array($result1, $dbi);
if ((is_user($user)) AND ($userinfo[username] == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
|
They copied the lines directly from YA so it's the exact same issue as YA. |
Update: I found the following must be changed as well to allow users to edit their personals profile as well as modify their location:
FIND:
Code:function edituser1(){
global $user_prefix,$currentlang,$user,$module_name, $cookie, $sitename, $userinfo,$dbi;
getusrinfo($user);
$result = sql_query("select ffusername,uid,height,weight,langspeaks,dislike,myfbooks,myfcolor,mymostlikeman,mymostlikeplace,haircolor,hairstyle,facialhair,eyecolor,eyewear,bodytype,favoriteitem,disabilities,healthstatus profile from ".$user_prefix."_user_profile2 where ffusername='$userinfo[username]'", $dbi);
$row= sql_fetch_array($result, $dbi);
require("modules/$module_name/data/data-$currentlang.php");
if (($userinfo[username] != $cookie[1]) AND ($userinfo[user_password] != $cookie[2])) {
|
REPLACE WITH:
Code:function edituser1(){
global $user_prefix,$currentlang,$user,$module_name, $cookie, $sitename, $userinfo,$dbi;
cookiedecode($user);
getusrinfo($user);
if ((is_user($user)) AND ($userinfo[username] == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
$result = sql_query("select ffusername,uid,height,weight,langspeaks,dislike,myfbooks,myfcolor,mymostlikeman,mymostlikeplace,haircolor,hairstyle,facialhair,eyecolor,eyewear,bodytype,favoriteitem,disabilities,healthstatus profile from ".$user_prefix."_user_profile2 where ffusername='$userinfo[username]'", $dbi);
$row= sql_fetch_array($result, $dbi);
require("modules/$module_name/data/data-$currentlang.php");
|
FIND:
Code:function editcountry() {
global $user, $userinfo,$dbi,$user_prefix, $cookie, $module_name,$currentlang;
include("modules/$module_name/data/data-$currentlang.php");
getusrinfo($user);
$result1 = sql_query("select ffusername,sex, birth, degree,oicq,selfintro,stapro,city,postcode,location, object, method, other, photo, keyword,time, click, song,film, marriage,tel,country,user_occ,havechild,wantchild,drink,smoke,race from ".$user_prefix."_user_profile1 where ffusername='$userinfo[username]'",$dbi);
$row = sql_fetch_array($result1, $dbi);
if (($userinfo[username] != $cookie[1]) AND ($userinfo[user_password] != $cookie[2])) {
|
REPLACE WITH:
Code:function editcountry() {
global $user, $userinfo,$dbi,$user_prefix, $cookie, $module_name,$currentlang;
include("modules/$module_name/data/data-$currentlang.php");
cookiedecode($user);
getusrinfo($user);
if ((is_user($user)) AND ($userinfo[username] == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
$result1 = sql_query("select ffusername,sex, birth, degree,oicq,selfintro,stapro,city,postcode,location, object, method, other, photo, keyword,time, click, song,film, marriage,tel,country,user_occ,havechild,wantchild,drink,smoke,race from ".$user_prefix."_user_profile1 where ffusername='$userinfo[username]'",$dbi);
$row = sql_fetch_array($result1, $dbi);
|
With these changes I had no more problems with the edit user functions. |
_________________ Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe |
|