Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

PHPフレームワークMakoで、ユーザーパスワードの変更

$
0
0
PHPフレームワークMako(4.5.10)で、ユーザーパスワードの変更です。ものすごく進みが遅いですが、とにかく前に(笑)。


use mako\security\Password;
use \app\models\User;

$password = Password::hash($password);

$user = $this->gatekeeper->getUser();
if ($user) {
$user = User::get($id);
$user->password = $password;
$user->save();
}
実際に設定してみたサイトがこちら

参考サイト
PHPフレームワークMakoで、パスワードハッシュ(Password hashing)

Viewing all articles
Browse latest Browse all 846

Trending Articles