Updated Account Info

Add Link and Unlink account with OAuth.
This commit is contained in:
jvelilla
2015-07-15 12:24:56 -03:00
parent d4fc9f9411
commit e42a7636ae
10 changed files with 237 additions and 13 deletions

View File

@@ -24,6 +24,39 @@
</div>
<hr>
{include file="block_change_password.tpl" /}
<hr>
<h4>Un-Associate Account with Oauth Consumer</h4>
<div>
{foreach item="consumer" from="$oauth_associated"}
<div>
<form method="post" action="{$site_url/}account/oauth-un-associate">
<div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
</div>
<div>
<button type="submit">Unlink {$consumer/}</button>
</div>
</form>
</div>
{/foreach}
</div>
<h4>Associate Account with Oauth Consumer</h4>
<div>
{foreach item="consumer" from="$oauth_not_associated"}
<div>
<form method="post" action="{$site_url/}account/oauth-associate">
<div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
</div>
<div>
<input type="email" id="email" name="email" value="{$email/}" required/>
<button type="submit">Link with {$consumer/}</button>
</div>
</form>
</div>
{/foreach}
</div>
<hr>
<h4>Roles</h4>
<div>

View File

@@ -4,7 +4,10 @@ CREATE TABLE $table_name (
`access_token` TEXT NOT NULL,
`created` DATETIME NOT NULL,
`details` TEXT NOT NULL,
`email` TEXT NOT NULL,
CONSTRAINT `uid`
UNIQUE(`uid`)
UNIQUE(`uid`),
CONSTRAINT `email`
UNIQUE(`email`)
);