mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
N°2574 - 💚 fix unit test
The behaviours has changed since the "password_renewed_date" is not changed only after the inter/update and no more just aftyer the $oUserLocal->Set('password')
This commit is contained in:
@@ -177,8 +177,20 @@ class UserLocal extends UserInternal
|
||||
|
||||
protected function OnUpdate()
|
||||
{
|
||||
parent::OnUpdate(); // TODO: Change the autogenerated stub
|
||||
parent::OnUpdate();
|
||||
|
||||
$this->OnWrite();
|
||||
}
|
||||
|
||||
protected function OnInsert()
|
||||
{
|
||||
parent::OnInsert();
|
||||
|
||||
$this->OnWrite();
|
||||
}
|
||||
|
||||
protected function OnWrite()
|
||||
{
|
||||
if (empty($this->m_oPasswordValidity))
|
||||
{
|
||||
return;
|
||||
@@ -204,6 +216,7 @@ class UserLocal extends UserInternal
|
||||
return (empty($this->m_oPasswordValidity)) || ($this->m_oPasswordValidity->isPasswordValid());
|
||||
}
|
||||
|
||||
|
||||
public function getPasswordValidityMessage()
|
||||
{
|
||||
if (ContextTag::Check(ContextTag::TAG_SETUP))
|
||||
@@ -220,7 +233,6 @@ class UserLocal extends UserInternal
|
||||
return $this->m_oPasswordValidity->getPasswordValidityMessage();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set the $m_oPasswordValidity based on UserLocalPasswordValidator instances vote.
|
||||
*
|
||||
@@ -281,7 +293,7 @@ class UserLocal extends UserInternal
|
||||
{
|
||||
if (strpos('contactid,login,language,password,status,profile_list,allowed_org_list', $sAttCode) !== false)
|
||||
{
|
||||
// contactid and allowed_org_list are disabled to make sure the portal remains accessible
|
||||
// contactid and allowed_org_list are disabled to make sure the portal remains accessible
|
||||
$aReasons[] = 'Sorry, this attribute is read-only in the demonstration mode!';
|
||||
$iFlags |= OPT_ATT_READONLY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user