public function attemptActivation($activationCode)
	{
		if ($this->activated)
		{
			throw new UserAlreadyActivatedException('Cannot attempt activation on an already activated user.');
		}

		if ($activationCode == $this->activation_code)
		{
			$this->activation_code = null;
			$this->activated       = true;
			$this->activated_at    = new DateTime;
			return $this->save();
		}

		return false;
	}
public function attemptActivation($activationCode)
	{
		if ($this->activated)
		{
			throw new UserAlreadyActivatedException('Cannot attempt activation on an already activated user.');
		}

		if ($activationCode == $this->activation_code)
		{
			$this->activation_code = null;
			$this->activated       = true;
			$this->activated_at    = new DateTime;
			return $this->save();
		}

		return false;
	}
public function attemptActivation ( $ activationCode ) { if ( $ this -> activated ) { throw new UserAlreadyActivatedException ( 'Cannot attempt activation on an already activated user.' ) ; } if ( $ activationCode == $ this -> activation_code ) { $ this -> activation_code = null ; $ this -> activated = true ; $ this -> activated_at = new DateTime ; return $ this -> save ( ) ; } return false ; }
Attempts to activate the given user by checking
the activate code. If the user is activated already,
an Exception is thrown.

@param  string  $activationCode
@return bool
@throws \Cartalyst\Sentry\Users\UserAlreadyActivatedException
Attempts to activate the given user by checking the activate code . If the user is activated already an Exception is thrown .