Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

cant update members

Asked Modified Viewed 2,288 times
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
  • Started this discussions
asked
Member

Hey

can someone help me, i cant edit my members profile and update it. when i have made the edit and press save. i load some seconds and then i get a empty site, and no changes are made ?

i have attach the file.
0 replies

4 posts

S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
  • Started this discussions
answered
Member

*bump. i really need some help here, what can be wrong. ?
0 replies
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
  • Started this discussions
answered
Member

*bump

@Nick can it have somthing to do with the last to update. in the cvs ?
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

You may have an error in admin/updateuser.php.
0 replies
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
  • Started this discussions
answered
Member

Fie'ed

the error was the red text below. and it need to be deleted to.

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("location: ../index.php"); exit; }
if (!checkrights("M")) fallback("../index.php");
if (!isset($user_id) || !isNum($user_id)) fallback(FUSION_SELF);

$error = ""; $set_avatar = "";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$user_id'");
$data2 = dbarray($result);
if ($user_id == 1) $error .= $locale['450']."<br>\n";

$user_name = trim(eregi_replace(" +", " ", $_POST['user_name']));

if ($user_name == "" || $_POST['user_email'] == "") {
   $error .= $locale['451']."<br>\n";
} else {
   if (!preg_match("/^[-0-9A-Z_@\s]+$/i", $user_name)) $error .= $locale['452']."<br>\n";
   
   if ($user_name != $data2['user_name']) {
      $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name'");
      if (dbrows($result) != 0) {
         $error .= $locale['453']."<br>\n";
      }
   }
   
   if (!preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $_POST['user_email'])) $error .= $locale['454']."<br>\n";
   
   if ($_POST['user_email'] != $data2['user_email']) {
      $result = dbquery("SELECT user_email FROM ".$db_prefix."users WHERE user_email='".$_POST['user_email']."'");
      if (dbrows($result) != 0) {
         $error = $locale['455']."<br>\n";
      }
   }
}

if ($_POST['user_newpassword'] != "") {
   if ($_POST['user_newpassword2'] != $_POST['user_newpassword']) {
      $error .= $locale['456']."<br>";
   } else {
      if ($_POST['user_hash'] == $data2['user_password']) {
         if (!preg_match("/^[0-9A-Z@]{6,20}$/i", $_POST['user_newpassword'])) {
            $error .= $locale['457']."<br>\n";
         }
      } else {         
         $error .= $locale['458']."<br>\n";
      }
   }
}

$user_hide_email = isNum($_POST['user_hide_email']) ? $_POST['user_hide_email'] : "1";
$user_location = isset($_POST['user_location']) ? stripinput(trim($_POST['user_location'])) : "";
if ($_POST['user_month'] != 0 && $_POST['user_day'] != 0 && $_POST['user_year'] != 0) {
   $user_birthdate = (isNum($_POST['user_year']) ? $_POST['user_year'] : "0000")
   ."-".(isNum($_POST['user_month']) ? $_POST['user_month'] : "00")
   ."-".(isNum($_POST['user_day']) ? $_POST['user_day'] : "00");
} else {
   $user_birthdate = "0000-00-00";
}
$user_aim = isset($_POST['user_aim']) ? stripinput(trim($_POST['user_aim'])) : "";
$user_icq = isset($_POST['user_icq']) ? stripinput(trim($_POST['user_icq'])) : "";
$user_msn = isset($_POST['user_msn']) ? stripinput(trim($_POST['user_msn'])) : "";
$user_yahoo = isset($_POST['user_yahoo']) ? stripinput(trim($_POST['user_yahoo'])) : "";
$user_web = isset($_POST['user_web']) ? stripinput(trim($_POST['user_web'])) : "";
$user_theme = stripinput($_POST['user_theme']);
$user_offset = is_numeric($_POST['user_offset']) ? $_POST['user_offset'] : "0";
$user_sig = isset($_POST['user_sig']) ? stripinput(trim($_POST['user_sig'])) : "";

if ($error == "") {
   $newavatar = $_FILES['user_avatar'];
if ($userdata['user_avatar'] == "" && !empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
   if (preg_match("/^[-0-9A-Z_\.\[\]]+$/i", $newavatar['name']) && $newavatar['size'] <= 30720) {
      [color=red]if (is_uploaded_file($newavatar['tmp_name']) && $newavatar['size'] <= $avadmin['avatar_admin_size']) {[/color]
         $avatarext = strrchr($newavatar['name'],".");
         if ($avatarext == ".gif" || $avatarext == ".jpg" || $avatarext == ".png") {
            $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], "."));
            $avatarname = $avatarname."[".$user_id."]".$avatarext;
            $set_avatar = "user_avatar='$avatarname', ";
            move_uploaded_file($newavatar['tmp_name'], IMAGES."avatars/".$avatarname);
            chmod(IMAGES."/avatars/".$avatarname,0644);
            $size = getimagesize(IMAGES."avatars/".$avatarname);
            if ($size['0'] > $avadmin['avatar_admin_width'] || $size['1'] > $avadmin['avatar_admin_height']) {
               unlink(IMAGES."avatars/".$avatarname);
               $set_avatar = "";
            }
         }
   unlink($newavatar['tmp_name']);
   }

   if (isset($_POST['del_avatar'])) {
      $set_avatar = "user_avatar='', ";
      unlink(IMAGES."avatars/".$data2['user_avatar']);
   }
   
   if ($user_newpassword != "") { $newpass = " user_password=md5('$user_newpassword'), "; } else { $newpass = " "; }
   $result = dbquery("UPDATE ".$db_prefix."users SET user_name='$user_name',".$newpass."user_email='".$_POST['user_email']."', user_hide_email='$user_hide_email', user_location='$user_location', user_birthdate='$user_birthdate', user_icq='$user_icq', user_msn='$user_msn', user_yahoo='$user_yahoo', user_web='$user_web', user_theme='$user_theme', user_offset='$user_offset', ".$set_avatar."user_sig='$user_sig' WHERE user_id='$user_id'");
}
?>
Edited by shearer on 14-01-2006 21:03,
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet