Example #1
0
 /**
  * Show the users index page.
  *
  * @return \Response
  */
 public function getIndex()
 {
     //$users        = $this->users->findAllPaginated();
     $tagList = $this->tags->listAll();
     $categoryList = $this->categories->listAll();
     $userList = $this->users->listAllCompany();
     $this->view('admin.users.jobOpp', compact('tagList', 'categoryList', 'userList'));
 }
 /**
  * Post registration form.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postRegister()
 {
     $form = $this->users->getRegistrationForm();
     if (!$form->isValid()) {
         return $this->redirectBack(['errors' => $form->getErrors()]);
     }
     if ($user = $this->users->create($form->getInputData())) {
         Auth::login($user);
         return $this->redirectRoute('user.index', [], ['first_use' => true]);
     }
     return $this->redirectRoute('home');
 }
Example #3
0
 /**
  * Handle the creation of a tag.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postIndex()
 {
     $userid = $this->users->findById(\Input::get('userid'));
     $userid->active_account = \Input::get('active_account');
     $userid->save();
     $users = $this->users->findAllPaginated();
     ///////////////////////////////////
     if (\Input::get('active_account') == 1) {
         if (!empty(\Input::get('emailcompany'))) {
             \Mail::queue('emails.auth.companyNotification', array('msg' => \Lang::get('emails.welcomelogin')), function ($message) {
                 $message->to(\Input::get('emailcompany'))->subject(\Lang::get('emails.newCompany'));
             });
         }
         //////////////////
     }
     $this->view('admin.users.list', compact('users'));
 }
Example #4
0
 /**
  * Post registration form.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postRegister()
 {
     $form = $this->users->getRegistrationForm();
     ///////////////////////////////////
     \Mail::queue('emails.auth.adminNotification', array('msg' => Input::get('companyname')), function ($message) {
         $message->to('*****@*****.**')->subject(\Lang::get('emails.newCompanyreset'));
     });
     //////////////////
     if (!$form->isValid()) {
         return $this->redirectBack(['errors' => $form->getErrors()]);
     }
     if ($user = $this->users->create($form->getInputData())) {
         Auth::login($user);
         return $this->redirectRoute('user.index', [], ['first_use' => true]);
     }
     return $this->redirectRoute('home');
 }
Example #5
0
 /**
  * Register a new user using their Github account.
  *
  * @param  string $code
  * @return \Tricks\User
  */
 public function register($code)
 {
     $token = $this->provider->getAccessToken('authorization_code', ['code' => $code]);
     $userDetails = $this->provider->getUserDetails($token);
     $verifiedEmails = $this->getVerifiedEmails($token->accessToken);
     $userDetails->email = $this->getPrimaryEmail($verifiedEmails);
     $profile = $this->profiles->findByUid($userDetails->uid);
     if (is_null($profile)) {
         $user = $this->users->findByEmail($userDetails->email);
         if (is_null($user)) {
             $user = $this->users->createFromGithubData($userDetails);
         }
         $profile = $this->profiles->createFromGithubData($userDetails, $user, $token->accessToken);
     } else {
         $profile = $this->profiles->updateToken($profile, $token->accessToken);
         $user = $profile->user;
     }
     return $user;
 }
 /**
  * Show the users index page.
  *
  * @return \Response
  */
 public function getIndex()
 {
     $users = $this->users->findAllPaginated();
     $this->view('admin.users.list', compact('users'));
 }
 /**
  * Show the user's public profile page.
  *
  * @param  string  $username
  * @return \Response
  */
 public function getPublic($username)
 {
     $user = $this->users->requireByUsername($username);
     $tricks = $this->tricks->findAllForUser($user);
     $this->view('user.public', compact('user', 'tricks'));
 }
 /**
  * Show the users index page.
  *
  * @return \Response
  */
 public function getIndex($users)
 {
     $userList = $this->users->findByUsername($users);
     //var_dump($userList);
     $this->view('admin.users.companyinfo', compact('userList'));
 }