2013”N12ŒŽ03“ú

CakePHP 2.3.10‚Å”FØƒ`ƒ…[ƒgƒŠƒAƒ‹

2005A2006”N‚ ‚½‚è‚́ACakePHP‚ª‚¤‚Ԑº‚ðã‚��‚½‚�}‚ë‚ɂ͂��‚ë‚��‚늈“®‚µ‚��‚½“��‰€‚Å‚·B
cakephp.jp ‚𐮔õ‚µ‚½‚èAƒ}ƒjƒ…ƒAƒ‹‚ð‘‚ï¿½ï¿½‚½‚èAƒRƒ~ƒ…ƒjƒeƒB‚ð‚à‚è‚ ‚��‚½‚è‚ƐFX‚µ‚��‚½‚ȁ[B
¡‰ñA‹v‚µ‚Ô‚è‚ɐV‹KƒvƒƒWƒFƒNƒg‚ðCake‚ł‚­‚è‚͂��‚ß‚Ü‚µ‚½B

‚»‚ê‚قǍŐV‚Ì‚à‚Ì‚Å‚Í‚È‚­‚Ä‚æ‚��‚ƁA2.3.10‚ōì‚è‚͂��‚߂悤‚©‚ÆŽv‚Á‚½‚Ì‚Å‚·‚ªA‚¿‚å‚Á‚Æ‚Í‚Ü‚Á‚½‚̂ł�}‚�}‚ɏ‘‚��‚�N‚«‚Ü‚·B
CakePHP 2.X —p‚ɂ́Aƒ`ƒ…[ƒgƒŠƒAƒ‹F

"ƒVƒ“ƒvƒ‹‚È”FØ‚Ə³”F‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“"
http://book.cakephp.org/2.0/ja/tutorials-and-examples/blog-auth-example/auth.html

‚ª‚ ‚è‚Ü‚·‚ªA‚�}‚ꂪ‚à‚¤2.4.X‚��‚á‚Ȃ��‚Æ“®ì‚µ‚Ȃ��ƒR[ƒh‚É‚È‚Á‚��‚Ü‚·B2.3.10‚ł�}‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ð‚͂��‚ß‚½‚ç‚Í‚Ü‚è‚Ü‚µ‚½B

ƒ`ƒ…[ƒgƒŠƒAƒ‹‚ł́A
“ª‚Å

App::uses('SimplePasswordHasher', 'Controller/Component/Auth');

beforeSave()“à‚Å

$passwordHasher = new SimplePasswordHasher();
$this->data[$this->alias]['password'] = $passwordHasher->hash($this->data[$this->alias]['password']);

‚Æ‚È‚Á‚��‚Ü‚·‚ªA2.3.10‚ł͂�}‚�}‚ªA

$this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']);

‚Æ‚·‚é•K—v‚ª‚ ‚é‚炵‚��‚Å‚·B

posted by SDozono at 15:07| “Œ‹ž ☀| Comment(0) | TrackBack(0) | CakePHP General | ‚}‚̃uƒƒO‚Ì“ÇŽÒ‚É‚È‚é | XVî•ñ‚ðƒ`ƒFƒbƒN‚·‚é
‚�}‚Ì‹LŽ–‚ւ̃Rƒƒ“ƒg
ƒRƒƒ“ƒg‚ð‘‚­
‚�N–¼‘O: [•K{“ü—Í]

ƒ[ƒ‹ƒAƒhƒŒƒX:

ƒz[ƒ€ƒy[ƒWƒAƒhƒŒƒX:

ƒRƒƒ“ƒg: [•K{“ü—Í]

”FØƒR[ƒh: [•K{“ü—Í]


¦‰æ‘œ‚Ì’†‚̕��Žš‚𔼊p‚Å“ü—Í‚µ‚Ä‚­‚¾‚³‚��B

‚�}‚Ì‹LŽ–‚ւ̃gƒ‰ƒbƒNƒoƒbƒN
Žèiƒp[jTo make a comment: Please type your name and comment. at the validation field box, type 'cakephp'. And there two glay buttons. "Preview"/"Submit". Thank you!