Commit bd81f791 authored by counter-reverse's avatar counter-reverse

Function new() added to the trait User

parent 21e5b93b
Pipeline #2928 passed with stages
in 2 minutes and 34 seconds
......@@ -184,6 +184,18 @@ pub struct User {
impl User {
pub fn new(new_user: String, new_hash: Option<(String, Option<Encoded>)>, new_uid: usize, new_gid: usize, new_name: String, new_home: String, new_shell: String, new_auth_delay: Duration) -> Result<User> {
Ok(User{user: new_user,
hash: new_hash,
uid: new_uid,
gid: new_gid,
name: new_name,
home: new_home,
shell: new_shell,
auth_delay: new_auth_delay,
/// Set the password for a user. Make sure the password you have
/// received is actually what the user wants as their password (this doesn't).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment