fix: when old members update their passsword it will now check if they could be a member
Closes #27
This commit is contained in:
parent
7ca705cc0a
commit
5b94811276
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue