Exemple #1
0
 public function store($request)
 {
     $user = User::create(['first_name' => $request['first_name'], 'last_name' => $request['last_name'], 'email' => $request['email'], 'password' => bcrypt($request['password']), 'userCategory' => 5, 'hash_id' => str_random(100), 'verified' => 0]);
     $user->prof_pic()->create([]);
     $this->mailer->sendConfirmEmailLink($user);
     return $user;
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Exemple #3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     if (\Request::path() == "auth/register/investor") {
         $user = $this->investor_request->where('investor_email', '=', $data['email'])->first()->user()->create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'more_details' => $data['more_details'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'userCategory' => 2, 'hash_id' => str_random(100), 'verified' => 1]);
         $user->prof_pic()->create([]);
         //$this->mailer->sendConfirmEmailLink();
         return $user;
     } elseif (\Request::path() == "auth/register/innovator") {
         $user = User::create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'more_details' => $data['more_details'], 'terms' => $data['terms'], 'userCategory' => 1, 'hash_id' => str_random(100), 'verified' => 0]);
         $user->prof_pic()->create([]);
         $this->mailer->sendConfirmEmailLink($user);
         return $user;
     } elseif (\Request::path() == "auth/register/expert") {
         $user = $this->bongo_request->where('bongo_email', '=', $data['email'])->first()->user()->create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'more_details' => $data['more_details'], 'userCategory' => 3, 'hash_id' => str_random(100), 'verified' => 1]);
         $user->prof_pic()->create([]);
         //$this->mailer->sendConfirmEmailLink($user);
         return $user;
     } elseif (\Request::path() == "auth/register/moderator") {
         $user = User::create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'userCategory' => 5, 'hash_id' => str_random(100), 'verified' => 1]);
         $user->prof_pic()->create([]);
         $this->mailer->sendConfirmEmailLink($user);
         return $user;
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     User::create(['first_name' => 'Chris', 'last_name' => 'Gmyr', 'email' => '*****@*****.**', 'password' => Hash::make('pass123')]);
     User::create(['first_name' => 'Taylor', 'last_name' => 'Otwell', 'email' => '*****@*****.**', 'password' => Hash::make('pass123')]);
 }