Guest User

Untitled

a guest
Sep 18th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Kohana 3.1 Auth, password field wont generate an error
  2. <?=Form::open('/signup/user');?>
  3. <?=Form::label('username', 'Username: ')?>
  4. <?=Form::input('username', isset($username)?$username:''); ?>
  5. <br />
  6. <?=Form::label('password', 'Password: ')?>
  7. <?=Form::password('password', ''); ?>
  8. <br />
  9. <?=Form::label('confirm', 'Re-enter Password: ')?>
  10. <?=Form::password('confirm', ''); ?>
  11. <br />
  12. <?=Form::label('email', 'Email: ')?>
  13. <?=Form::input('email', ''); ?>
  14. <?=Form::submit('submit', "Submit"); ?>
  15. <?=Form::close()?>
  16.  
  17. public function action_user(){
  18. if($this->request->method() == "POST"){
  19. $this->template->set('username', $this->request->post('username'));
  20. $user = ORM::factory('user');
  21. try{
  22. $user->values($_POST)->save();
  23. }catch(ORM_Validation_Exception $e){
  24. var_dump($e->errors());
  25. }
  26. }
  27. }
Add Comment
Please, Sign In to add comment