public function resendActivation() { $user_id = Auth::id(); $email = LoggedInUser::email(); $this->sendActivation($user_id, $email); return Alert::activate($email); }
public function index($username) { $user = User::whereUsername($username)->firstOrFail(); $profile = $user->profile()->first(); if (Auth::check()) { if (LoggedInUser::username() == $username) { return $this->showMyProfile($user, $profile); } else { return $this->showOthersProfile($user, $profile); } } return $this->showGuestProfile($user, $profile); }
public function index() { $user = User::whereUsername(LoggedInUser::username())->firstOrFail(); $profile = $user->profile()->first(); $title = "My Settings"; $email_notifications = Profile::getEmailNotifications(); $email_user_settings = Profile::getMyEmailNotifications(Auth::id()); $currentQuestion = Question::getCurrentQuestion(); $remaining_time = Question::getRemainingTime($currentQuestion); $leading = Post::getLeadingBant($currentQuestion); $posts = $user->posts()->get(); return View::make('profile.dashboard.settings')->with(['question' => $currentQuestion, 'remaining_time' => $remaining_time, 'leading' => $leading, 'profile' => $profile, 'user' => $user, 'email_notifications' => $email_notifications, 'email_user_settings' => $email_user_settings, 'posts' => $posts, 'title' => $title]); }
public function save(LoggedInUser $user, TempCredentials $t) { file_put_contents(self::getFileName($user->getUserName()), serialize($t)); }