public function activateUser($email, $activationKey)
    {
        if ($this->validateActivationKey($email, $activationKey)) {
            $user = $this->findByEmailAndActivationKey($email, $activationKey)->first();

            if ($user->active == 0) {
                $user->active = 1;
                $user->activation_key = null;
                if ($this->save($user)) {
                    return true;
                }
            }
        }

        return false;
    }
public function activateUser($email, $activationKey)
    {
        if ($this->validateActivationKey($email, $activationKey)) {
            $user = $this->findByEmailAndActivationKey($email, $activationKey)->first();

            if ($user->active == 0) {
                $user->active = 1;
                $user->activation_key = null;
                if ($this->save($user)) {
                    return true;
                }
            }
        }

        return false;
    }
public function activateUser ( $ email , $ activationKey ) { if ( $ this -> validateActivationKey ( $ email , $ activationKey ) ) { $ user = $ this -> findByEmailAndActivationKey ( $ email , $ activationKey ) -> first ( ) ; if ( $ user -> active == 0 ) { $ user -> active = 1 ; $ user -> activation_key = null ; if ( $ this -> save ( $ user ) ) { return true ; } } } return false ; }
Activates an user

@param string $email E-mailaddress of the user.
@param string $activationKey Activation key of the user.
@return bool
Activates an user