Advertisement
dberry

Controller_Auth

Dec 15th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. class Controller_Auth extends \Controller {
  4.    
  5.     public function action_register()
  6.     {
  7.         $user = new \Warden\Model_User(array(
  8.             'username' => 'dberry',
  9.             'password' => 'Stinky1*',
  10.             'email'    => 'daniel@berrymediagroup.com',
  11.         ));
  12.        
  13.         $user->profile = new \Model_Profile(array(
  14.             'first_name' => 'Daniel',
  15.             'last_name'  => 'Berry',
  16.             'title'      => 'Mr.',
  17.             'city'       => 'Manchester',
  18.             'state'      => 'TN',
  19.             'zipcode'    => '37355',
  20.             'country'    => 'US'
  21.         ));
  22.        
  23.         try
  24.         {
  25.             $user->save();
  26.         }
  27.         catch(Exception $e)
  28.         {
  29.             die($e);
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement