コード例 #1
0
 case "u_edit":
     // Change user parameters
     if ($auth->auth["uid"] == $u_id) {
         // user changes his own account
         $password = trim($password);
         $cpassword = trim($cpassword);
         $realname = trim($realname);
         $email_usr = trim($email_usr);
         if (strcmp($password, $cpassword)) {
             // password are identical?
             $be->box_full($t->translate("Error"), $t->translate("The passwords are not identical") . ". " . $t->translate("Please try again") . "!");
             break;
         }
         $query = "UPDATE auth_user SET password='******', realname='{$realname}', email_usr='******', modification_usr=NOW() WHERE user_id='{$u_id}'";
         $db->query($query);
         if ($db->affected_rows() == 0) {
             $be->box_full($t->translate("Error"), $t->translate("Change User Parameters failed") . ":<br>{$query}");
             break;
         }
         $bi->box_full($t->translate("Change User Parameters"), $t->translate("Password and/or E-Mail Address of") . " <b>" . $auth->auth["uname"] . "</b> " . $t->translate("is changed") . ".");
         if ($ml_notify) {
             $message = "Username: "******"uname"] . "\n";
             $message .= "Realname: {$realname}\n";
             $message .= "E-Mail:   {$email_usr}\n";
             mailuser("admin", "User parameters has changed", $message);
         }
     } else {
         $be->box_full($t->translate("Error"), $t->translate("Access denied"));
     }
     break;
 default: