我尝试将插件写入pimcore并在其中使用User类来更改数据库中的用户表。我该怎么办? 简单地:
$user = Objects\User::getById(2);
不起作用:
include_once(Pimcore/Model/Object/ClassDefinition/Data/Objects/User.php): failed to open stream: No such file or directory in /var/www/pimcore/pimcore/lib/Zend/Loader.php on line 134
提前感谢!
答案 0 :(得分:1)
我这样做了:
`$db = Mysql::get();
$select = $db->select()
->from('users', ['lastpasswordedit'])
->where('id = ?', $userId);
$stmt = $db->query($select);
$result = $stmt->fetch();`
谢谢@Igor Benko!