2
我使用Doctrine:Symfony的 - 注册系统 - 确认密码,并隐藏输入
User:
columns:
username: { type: string(255), unique: true }
password: { type: string(255) }
ip: { type: string(255) }
这产生了我新的形式:
username:
password:
ip:
我怎样才能使确认密码,并在隐蔽获取IP地址输入?
我:
username:
password:
confirm password:
和MySQL数据库将用户名,密码以及IP($ _ SERVER [ 'REMOTE_ADDR'];) 我怎样才能使它在Symfony的1.4?
THX!
@@@@@@@
补充说:
我做:
$user = $this->form->getObject();
$user->setPassword(sha1($user->getPassword()));
$user->setIp($_SERVER['REMOTE_ADDR']);
$user = $form->save();
setPassword不起作用,但SETIP良好的工作。
非常非常感谢:)我尽快尝试 –
sfDoctrineGuardPlugin可能不使用数据库,我必须使用mysql –
我试过了。它工作得很好。感谢您的帮助! –