src/controllers/UserController.php
public function getActivate($activationCode)
    {
        $activated = false;
        try {
            // Find the user using the activation code
            $user = Sentry::getUserProvider()->findByActivationCode($activationCode);

            // Attempt to activate the user
            if($user->attemptActivation($activationCode)) {
                $message = trans("Your account is successfully activated.");
                $activated = true;
            } else {
                // User activation failed
                $message = trans("Your account could not be activated.");
            }
        } catch(\Exception $e) {
            // User not found, activation found or other errors
            $message = trans("Your account could not be activated.");
        }

        $this->layout = View::make(Config::get('syntara::views.user-activation'), array('activated' => $activated, 'message' => $message));
    }
public function getActivate($activationCode)
    {
        $activated = false;
        try {
            // Find the user using the activation code
            $user = Sentry::getUserProvider()->findByActivationCode($activationCode);

            // Attempt to activate the user
            if($user->attemptActivation($activationCode)) {
                $message = trans("Your account is successfully activated.");
                $activated = true;
            } else {
                // User activation failed
                $message = trans("Your account could not be activated.");
            }
        } catch(\Exception $e) {
            // User not found, activation found or other errors
            $message = trans("Your account could not be activated.");
        }

        $this->layout = View::make(Config::get('syntara::views.user-activation'), array('activated' => $activated, 'message' => $message));
    }
Activate a user (from an email)
@param  string $activationCode