fix: when old members update their passsword it will now check if they could be a member

Closes #27
This commit is contained in:
silver 2024-06-07 18:52:26 +01:00
parent 7ca705cc0a
commit 5b94811276

View file

@ -50,10 +50,6 @@ pub async fn submit(mut req: Request<State>) -> tide::Result {
// check if the password field itself is being updated
if &field != "userPassword" {
if !is_skynet_user && &field == "mail" {
activate_group(db, config, &auth.user, &value).await;
}
// if password is not being updated then just update the required field
let mods = vec![
// the value we are updating
@ -72,6 +68,10 @@ pub async fn submit(mut req: Request<State>) -> tide::Result {
ldap.extended(tmp)?.success()?;
};
if !is_skynet_user && (&field == "mail" || &field == "userPassword") {
activate_group(db, config, &auth.user, &value).await;
}
ldap.unbind()?;
// if its mail update the local db