Logo Search packages:      
Sourcecode: samba-gtk version File versions  Download package

def sambagtk::pygwsam::SAMPipeManager::info_to_user (   self,
  query_info,
  user = None 
)
Converts 'query_info' information into a user type. Values in 'user' will be overwriten by this function. If called with 'None' then a new User structure will be created

returns 'user'

Definition at line 285 of file pygwsam.py.

                                                   :
        """Converts 'query_info' information into a user type. Values in 'user' will be overwriten by this function. If called with 'None' then a new User structure will be created
        
        returns 'user'"""
        if (user == None):
            user = User(self.get_lsa_string(query_info.account_name), 
                        self.get_lsa_string(query_info.full_name), 
                        self.get_lsa_string(query_info.description), 
                        query_info.rid)
        else:
            user.username = self.get_lsa_string(query_info.account_name)
            user.full_name = self.get_lsa_string(query_info.full_name)
            user.description = self.get_lsa_string(query_info.description)
            user.rid = query_info.rid
        
        user.must_change_password = (query_info.acct_flags & samr.ACB_PW_EXPIRED) != 0
        user.password_never_expires = (query_info.acct_flags & samr.ACB_PWNOEXP) != 0
        user.account_disabled = (query_info.acct_flags & samr.ACB_DISABLED) != 0
        user.account_locked_out = (query_info.acct_flags & samr.ACB_AUTOLOCK) != 0
        #cannot_change_password doesn't get set in a flag, it's a little different
        user.profile_path = self.get_lsa_string(query_info.profile_path)
        user.logon_script = self.get_lsa_string(query_info.logon_script)
        user.homedir_path = self.get_lsa_string(query_info.home_directory)
        
        
        
        drive = self.get_lsa_string(query_info.home_drive)
        if (len(drive) == 2):
            user.map_homedir_drive = ord(drive[0]) - ord('A')
        else:
            user.map_homedir_drive = -1
            
        return user
    

Generated by  Doxygen 1.6.0   Back to index