diff --git a/examples/demo/site/modules/oauth20/templates/block_account_info.tpl b/examples/demo/site/modules/oauth20/templates/block_account_info.tpl
index 025c463..4a4c7ef 100644
--- a/examples/demo/site/modules/oauth20/templates/block_account_info.tpl
+++ b/examples/demo/site/modules/oauth20/templates/block_account_info.tpl
@@ -1,12 +1,11 @@
+ {unless isempty="$oauth_associated"}
Un-Associate Account with Oauth Consumer
{foreach item="consumer" from="$oauth_associated"}
{/foreach}
+ {/unless}
+ {unless isempty="$oauth_not_associated"}
Associate Account with Oauth Consumer
{foreach item="consumer" from="$oauth_not_associated"}
\ No newline at end of file
+
+ {/unless}
diff --git a/modules/oauth20/cms_oauth_20_module.e b/modules/oauth20/cms_oauth_20_module.e
index 3c6b105..7116dfd 100644
--- a/modules/oauth20/cms_oauth_20_module.e
+++ b/modules/oauth20/cms_oauth_20_module.e
@@ -266,10 +266,12 @@ feature -- Hooks
a_response.location.starts_with ("account/roc-oauth-login")
then
get_block_view_login (a_block_id, a_response)
- elseif a_block_id.is_case_insensitive_equal_general ("account") then
+ elseif a_block_id.is_case_insensitive_equal_general ("account") and then
+ a_response.location.same_string ("account")
+ then
if
attached template_block ("account_info", a_response) as l_tpl_block and then
- attached current_user (a_response.request) as l_user
+ attached a_response.user as l_user
then
associate_account (l_user, a_response.values)
a_response.add_block (l_tpl_block, "content")
diff --git a/modules/oauth20/site/templates/block_account_info.tpl b/modules/oauth20/site/templates/block_account_info.tpl
index 025c463..4a4c7ef 100644
--- a/modules/oauth20/site/templates/block_account_info.tpl
+++ b/modules/oauth20/site/templates/block_account_info.tpl
@@ -1,12 +1,11 @@
+ {unless isempty="$oauth_associated"}
Un-Associate Account with Oauth Consumer
{foreach item="consumer" from="$oauth_associated"}
{/foreach}
+ {/unless}
+ {unless isempty="$oauth_not_associated"}
Associate Account with Oauth Consumer
{foreach item="consumer" from="$oauth_not_associated"}
\ No newline at end of file
+
+ {/unless}