View | Details | Raw Unified | Return to bug 46067
Collapse All | Expand All

(-)a/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py (-2 / +9 lines)
 Lines 1507-1512   class object(univention.admin.handlers.simpleLdap): Link Here 
1507
	def __init__(self, co, lo, position, dn='', superordinate=None, attributes=None):
1507
	def __init__(self, co, lo, position, dn='', superordinate=None, attributes=None):
1508
		self.groupsLoaded = True
1508
		self.groupsLoaded = True
1509
		self.password_length = 8
1509
		self.password_length = 8
1510
		self.properties_touched_after_open = set()
1510
1511
1511
		univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes)
1512
		univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes)
1512
1513
 Lines 2054-2061   class object(univention.admin.handlers.simpleLdap): Link Here 
2054
		return ml
2068
		return ml
2055
2069
2056
	def _modlist_password_expiry(self, ml, pwhistoryPolicy):
2070
	def _modlist_password_expiry(self, ml, pwhistoryPolicy):
2057
		pwd_change_next_login = self.hasChanged('pwdChangeNextLogin') and self['pwdChangeNextLogin'] == '1'
2071
		pwd_change_next_login = 'pwdChangeNextLogin' in self.properties_touched_after_open and self['pwdChangeNextLogin'] == '1'
2058
		unset_pwd_change_next_login = self.hasChanged('pwdChangeNextLogin') and self['pwdChangeNextLogin'] == '0'
2072
		unset_pwd_change_next_login = 'pwdChangeNextLogin' in self.properties_touched_after_open and self['pwdChangeNextLogin'] == '0'
2059
2073
2060
		now = (long(time.time()) / 3600 / 24)
2074
		now = (long(time.time()) / 3600 / 24)
2061
		shadowLastChange = str(int(now))
2075
		shadowLastChange = str(int(now))
 Lines 2542-2547   class object(univention.admin.handlers.simpleLdap): Link Here 
2542
	def _ldap_attributes(cls):
2570
	def _ldap_attributes(cls):
2543
		return ['*', 'pwdAccountLockedTime']
2571
		return ['*', 'pwdAccountLockedTime']
2544
2572
2573
	def __setitem__(self, key, value):
2574
		if self._open and key == 'pwdChangeNextLogin':
2575
			self.properties_touched_after_open.add(key)
2576
		# univention.admin.handlers.simpleLdap.__setitem__(self, key, value)
2577
		super(object, self).__setitem__(key, value)
2578
2545
	@classmethod
2579
	@classmethod
2546
	def rewrite(cls, filter, mapping):
2580
	def rewrite(cls, filter, mapping):
2547
		if filter.variable == 'username':
2581
		if filter.variable == 'username':

Return to bug 46067