mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 02:34:19 -04:00
Merge pull request #758 from RazeLighter777/master
Add password field to initial setup
This commit is contained in:
commit
0e2e731103
@ -16,6 +16,7 @@
|
|||||||
- [wtayl0r](https://github.com/wtayl0r)
|
- [wtayl0r](https://github.com/wtayl0r)
|
||||||
- [TtheCreator](https://github.com/Tthecreator)
|
- [TtheCreator](https://github.com/Tthecreator)
|
||||||
- [LogicalPhallacy](https://github.com/LogicalPhallacy/)
|
- [LogicalPhallacy](https://github.com/LogicalPhallacy/)
|
||||||
|
- [RazeLighter777](https://github.com/RazeLighter777)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
@ -102,7 +102,8 @@ namespace MediaBrowser.Api
|
|||||||
return new StartupUser
|
return new StartupUser
|
||||||
{
|
{
|
||||||
Name = user.Name,
|
Name = user.Name,
|
||||||
ConnectUserName = user.ConnectUserName
|
ConnectUserName = user.ConnectUserName,
|
||||||
|
Password = user.Password
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,8 +112,13 @@ namespace MediaBrowser.Api
|
|||||||
var user = _userManager.Users.First();
|
var user = _userManager.Users.First();
|
||||||
|
|
||||||
user.Name = request.Name;
|
user.Name = request.Name;
|
||||||
|
|
||||||
_userManager.UpdateUser(user);
|
_userManager.UpdateUser(user);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(request.Password)) {
|
||||||
|
await _userManager.ChangePassword(user, request.Password).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
var result = new UpdateStartupUserResult();
|
var result = new UpdateStartupUserResult();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -130,6 +136,7 @@ namespace MediaBrowser.Api
|
|||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string ConnectUserName { get; set; }
|
public string ConnectUserName { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UpdateStartupUserResult
|
public class UpdateStartupUserResult
|
||||||
|
Loading…
x
Reference in New Issue
Block a user