This commit is contained in:
parent
d6555edc29
commit
00bb6f152d
8 changed files with 332 additions and 11 deletions
|
@ -81,7 +81,6 @@ impl User {
|
|||
/// Change the password of a User
|
||||
///
|
||||
/// Returns a Result indicating whether the password change was successful or not
|
||||
#[must_use]
|
||||
pub async fn passwd(self, old: &str, new: &str) -> Result<(), ()> {
|
||||
if self.verify_pw(old) {
|
||||
sqlx::query("UPDATE users SET \"password\" = $1 WHERE username = $2;")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue