doucheng7234 2017-06-15 14:42
浏览 47

在TYPO3 7.6中从外部PHP应用程序更改用户的盐渍密码

I've upgraded a TYPO3 site from 6.2 to 7.6 LTS which now runs under a PHP 7.0 installation just fine. I also have a PHP application which I use to change a user's salted password (fe_user). The following code in my application worked fine under the 6.2 installation:

require Yii::app()->params['typo3Path'] . 'typo3/sysext/core/Classes/Core/Bootstrap.php';
define('TYPO3_MODE', 'FE');
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()
    baseSetup('typo3/')
    loadConfigurationAndInitialize();

But now in the 7.6 installation, this code throws an exception:

Class 'TYPO3\CMS\Core\Core\ApplicationContext' not found

Any ideas? Is there an "official" way to change a TYPO3 user's password from an API or something?

  • 写回答

1条回答 默认 最新

  • dongshanni1611 2017-06-16 16:35
    关注
    1. There's no official API to change a User's password from outside of Typo3.

    2. If you absolutely must handle user data outside of Typo3, you should probably look into switching to an external authentication mechanism alltogether. There's a bunch of extensions for that in the TER (OpenID, LDAP/Active Directory, SAML come to mind)

    3. If you still want to go the unofficial route, why would you instantiate the whole Typo3 Framework when you already have another framework in place? Just access the database table and change the password. The algorithm used to build the password hash is properly documented. By default Typo3 uses PBKDF2 to generate the hash these days.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度