Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コードを介して sfGuard でログイン アクションを強制する方法はありますか? 次のようなもの: $this->authenticate('username'); ?
前もって感謝します。
私はそれがそうだったと思う:
$user = // sfGuardUser object $user_id = $user->getId(); $this->getUser()->signIn($user_id, true);
...「rememberme」の2番目のパラメータはtrue/falseです。
プラグインlib/user /内のsfGuardSecurityUser.class.phpのsignIn関数を参照して、どのように機能するかを確認してください。