Ejemplo n.º 1
0
        }
    }
    /**
     * Check if user is activated or not.
     * 
     * @return type bool
     */
    public function checkIfEnabled()
    {
        return $this->accountEnabled;
    }
    public function createVerificationHash()
    {
        $this->verificationHash = md5(rand());
    }
    /**
     * Activate user once they click verification link from email.
     * 
     * @param type $hash
     */
    public function activateUser($hash)
    {
        if ($hash == $this->verificationHash) {
            $this->accountEnabled = true;
        } else {
            echo "Hash did not match.";
        }
    }
}
RegisteredUser::$objects = new RegisteredUserManager('RegisteredUser');