mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 03:32:49 +02:00
feat: ldap login
This commit is contained in:
parent
8b35de6a43
commit
c7adbae03f
17 changed files with 921 additions and 155 deletions
|
@ -68,7 +68,8 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
|
|||
// Create user
|
||||
self.services
|
||||
.users
|
||||
.create(&user_id, Some(password.as_str()))?;
|
||||
.create(&user_id, Some(password.as_str()), None)
|
||||
.await?;
|
||||
|
||||
// Default to pretty displayname
|
||||
let mut displayname = user_id.localpart().to_owned();
|
||||
|
@ -284,6 +285,7 @@ pub(super) async fn reset_password(&self, username: String, password: Option<Str
|
|||
.services
|
||||
.users
|
||||
.set_password(&user_id, Some(new_password.as_str()))
|
||||
.await
|
||||
{
|
||||
| Err(e) => return Err!("Couldn't reset the password for user {user_id}: {e}"),
|
||||
| Ok(()) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue