ユーザアカウントのアクティベーション方法
英語だけど参考になる記事
http://www.jonnyreeves.co.uk/2008/06/cakephp-activating-user-account-via-email/
ユーザアカウントを仮で作っておき、cakePHPのcore.phpのsaltと、createdレコードなどを組み合わせて、Security::hashを使ってユーザごとにアクティベーション用のキーとなる文字列を生成してメール送信してる。
下記がアクティベーションキーの生成メソッド。
function getActivationHash() { if (!isset($this->id)) { return false; } return substr(Security::hash(Configure::read(‘Security.salt’) . $this->field(‘created’) . date(‘Ymd’)), 0, 8); }
上記は、アクティベーション用のキーを生成するために、date('Ymd')を含めているので、アクティベーション期間はその日限りということなのかな。