|
@@ -418,16 +418,25 @@ class UserRights
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static function ChangePassword($sCurrentPassword, $sNewPassword)
|
|
|
|
|
|
+ public static function ChangePassword($sOldPassword, $sNewPassword, $sName = '')
|
|
{
|
|
{
|
|
- if (!is_null(self::$m_oUser))
|
|
|
|
|
|
+ if (empty($sName))
|
|
{
|
|
{
|
|
- return self::$m_oUser->ChangePassword($sCurrentPassword, $sNewPassword);
|
|
|
|
|
|
+ $oUser = self::$m_oUser;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ // find the id out of the login string
|
|
|
|
+ $oUser = self::FindUser($sName);
|
|
|
|
+ }
|
|
|
|
+ if (is_null($oUser))
|
|
|
|
+ {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ return $oUser->ChangePassword($sOldPassword, $sNewPassword);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public static function Impersonate($sName, $sPassword)
|
|
public static function Impersonate($sName, $sPassword)
|