Author Topic: lostpassword -> member.php?action=lostpassword  (Read 10571 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
lostpassword -> member.php?action=lostpassword
« on: August 08, 2011, 08:26:34 PM »
Hallo zusammen,

wenn ein User sein Passwort vergessen hat, kann er sich über "member.php?action=lostpassword" ein neues Passwort zusenden lassen.
Da ich mehrere Systeme in einer Datenbank installiert habe, möchte ich auch das die Passwörter in den anderen Systemen geändert wird.

if a user has forgotten his password, he can be sent via "member.php?action=lostpassword" a new password.
Since I have installed several systems in a database, I would like also changes the passwords in the other systems.

In der member.php ist da folgender Punkt zu finden:
In the following there member.php point is found:
      $sql "UPDATE ".USERS_TABLE."
              SET "
.get_user_table_field("""user_password")." = '".$user_password_hashed."'
              WHERE "
.get_user_table_field("""user_id")." = ".$checkuser[$user_table_fields['user_id']];
      
$site_db->query($sql);

Für das andere System müsste das ganze noch dazu so aussehen:
For the other system would have all still look to this:
      $sql "UPDATE pk__user
              SET user_pw = '"
.md5($user_password)."';
              WHERE "
.get_user_table_field("""user_id")." = ".$checkuser[$user_table_fields['user_id']];
      
$site_db->query($sql);

Das funktioniert leider nicht. Auch das funktioniert nicht
This does not work unfortunately. Even that does not work
      $sql "UPDATE pk__user
              SET user_pw = '"
.md5($user_password)."';
              WHERE user_id = "
.$checkuser[$user_table_fields['user_id']];
      
$site_db->query($sql);

Auch das direkte eintragen der User ID bringt nichts!?
Also enter the user ID does not direct?
      $sql "UPDATE pk__user
              SET user_pw = '"
.md5($user_password)."';
              WHERE user_id = '5'"
;
      
$site_db->query($sql);

Was ist denn hier schon wieder falsch? Ich danke für Hilfe im Voraus
What's going on here wrong again? I am grateful for the help in advance

Edit://
Kann mir da niemand helfen?
Warum funktioniert das nicht?
« Last Edit: August 09, 2011, 02:27:49 PM by Sumale.nin »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: lostpassword -> member.php?action=lostpassword
« Reply #1 on: August 11, 2011, 11:35:27 AM »
hi,

ungetestet, aber ich denke du hast ein ; zuviel bei

'".md5($user_password)."';
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Rembrandt

  • Guest
Re: lostpassword -> member.php?action=lostpassword
« Reply #2 on: August 11, 2011, 02:10:55 PM »
hi,

ungetestet, aber ich denke du hast ein ; zuviel bei
dafür ein " zuwenig :)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: lostpassword -> member.php?action=lostpassword
« Reply #3 on: August 11, 2011, 06:38:24 PM »
Man sieht den Wald vor lauter Bäumen nicht.... ich werde das testen, Danke!

Offline speed

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: lostpassword -> member.php?action=lostpassword
« Reply #4 on: May 07, 2012, 12:45:30 AM »

Auch das direkte eintragen der User ID bringt nichts!?
Also enter the user ID does not direct?
      $sql "UPDATE pk__user
              SET user_pw = '"
.md5($user_password)."';
              WHERE user_id = '5'"
;
      
$site_db->query($sql);

Was ist denn hier schon wieder falsch? Ich danke für Hilfe im Voraus
What's going on here wrong again? I am grateful for the help in advance

[/quote]

1. Debuggen in Sachen MySQL währe Sinnvoll.
2. '".md5($user_password)."'; ist nicht richtig, sondern so '".md5($user_password)."'  wie die anderen schon erwähnt haben.

$sql 
"UPDATE pk__user SET user_pw = '".md5($user_password)."' WHERE user_id = '5'";
print_r($sql); Wie sieht der String aus ?
$site_db->query($sql);