Commit 2c16c830 authored by counter-reverse's avatar counter-reverse

Merge branch 'counter/add_fn_new_to_user_and_group' into 'master'

Function new() added to the trait User

See merge request !1
parents 21e5b93b bd81f791
Pipeline #2929 passed with stages
in 2 minutes and 8 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