Example #1
0
 /**
  * ユーザ登録
  * @return \Fuel\Core\View
  */
 public function post_create()
 {
     if ($_POST) {
         //POSTデータを受け取る
         $username = Input::post('username');
         $password = Input::post('password');
         $email = Input::post('mail');
         $gender = Input::post('gender');
         $age = Input::post('age');
         $profile['gender'] = $gender;
         $profile['age'] = $age;
         //ユーザー登録
         $id = Auth::create_user($username, $password, $email);
         if (!empty($id)) {
             $result = Model_Users::find_by_pk($id)->set(array('age' => $age, 'gender' => $gender))->save();
             Auth::login($username, $password);
         }
     }
     Response::redirect('top');
 }
Example #2
0
 public function action_index()
 {
     Auth::create_user('longnd', '123456', '*****@*****.**', 1, array('fullname' => 'Nguyen Duy Long'));
     exit;
 }