Skip to main content

Reset password cho user trong SuiteCRM

Hướng dẫn tạo lại mật khẩu user của SuiteCRM bằng cách chạy query ở dưới đây

UPDATE users SET user_hash = md5('YourPassWord')
WHERE user_name = 'YourUserNameHere';

Trong đó YourPassWord là mật khẩu mới của bạn, và YourUserNameHere là tên user của bạn muốn thay đổi.

Note: Chú ý nên backup database trước để đảm bảo an toàn dữ liệu.

Nếu bạn không có thể chạy query trực tiếp trên Database, bạn có thể tạo file reset_pwd.php trong thư mục suitecrm của bạn 

<?php
$dbhost = "yourdbhost"; // replace yourdbhost with the value found in config.php
$dbuser = "yourdbuser"; // replace yourdbuserwith the value found in config.php
$dbpwd ="yourdbpwd"; // replace yourdbpwdwith the value found in config.php
$dbname = "yourdbname"; // replace yourdbnamewith the value found in config.php

    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbname);
    $result = $mysqli->query("UPDATE users SET user_hash = md5('YourPassWord') WHERE user_name = 'YourUserNameHere';;"); 
?>

Bạn có thể lấy thông tin Database từ file config.php

Sau đó bạn chạy file trên bằng link : exampleCRM.com/reset_pwd.php