Compare commits
No commits in common. "387acdbd09096037192e89678cfb7431ac7d215b" and "b8463122d6ca169819186dea07f8acfb9d46294c" have entirely different histories.
387acdbd09
...
b8463122d6
@ -226,15 +226,10 @@ async fn send_welcome_mail(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[get("/user/<user>/reset-pw")]
|
#[get("/user/<user>/reset-pw")]
|
||||||
async fn resetpw(db: &State<SqlitePool>, admin: AdminUser, user: i32) -> Flash<Redirect> {
|
async fn resetpw(db: &State<SqlitePool>, _admin: AdminUser, user: i32) -> Flash<Redirect> {
|
||||||
let user = User::find_by_id(db, user).await;
|
let user = User::find_by_id(db, user).await;
|
||||||
match user {
|
match user {
|
||||||
Some(user) => {
|
Some(user) => {
|
||||||
Log::create(
|
|
||||||
db,
|
|
||||||
format!("{} has resetted the pw for {}", admin.user.name, user.name),
|
|
||||||
)
|
|
||||||
.await;
|
|
||||||
user.reset_pw(db).await;
|
user.reset_pw(db).await;
|
||||||
Flash::success(
|
Flash::success(
|
||||||
Redirect::to("/admin/user"),
|
Redirect::to("/admin/user"),
|
||||||
|
Loading…
Reference in New Issue
Block a user