Skip to content

Commit

Permalink
- Add resetPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhu Lun committed Dec 11, 2015
1 parent eaf914a commit 1cf508e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions host/MoStudent.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,18 @@ function removeGetuiClientID($user_name) {
}
}

function resetPassword($user_id, $newpassword) {

$row = $this->db->MoStudent->findOne ( array (
'_id' => new MongoId($user_id)
) );

$row ['student_password'] = $newpassword;

$this->db->MoStudent->save ( $row );

return 1;
}

}

Expand Down

0 comments on commit 1cf508e

Please sign in to comment.