cleanup removeaccount
This commit is contained in:
parent
431a462d60
commit
e5e96dfbff
@ -9,6 +9,7 @@ function removeaccount_post(&$a) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password']))))
|
if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password']))))
|
||||||
|
notice( t('Password not correct.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify']))))
|
if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify']))))
|
||||||
@ -22,6 +23,7 @@ function removeaccount_post(&$a) {
|
|||||||
$account_id = get_account_id();
|
$account_id = get_account_id();
|
||||||
|
|
||||||
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
|
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
|
||||||
|
notice( t('Password not correct.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if($account['account_password_changed'] != NULL_DATE) {
|
if($account['account_password_changed'] != NULL_DATE) {
|
||||||
@ -55,7 +57,7 @@ function removeaccount_content(&$a) {
|
|||||||
'$basedir' => $a->get_baseurl(),
|
'$basedir' => $a->get_baseurl(),
|
||||||
'$hash' => $hash,
|
'$hash' => $hash,
|
||||||
'$title' => t('Remove This Account'),
|
'$title' => t('Remove This Account'),
|
||||||
'$desc' => t('This will completely remove this account including all its channels from the network. Once this has been done it is not recoverable.'),
|
'$desc' => array(t('WARNING: '), t('This account and all its channels will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
|
||||||
'$passwd' => t('Please enter your password for verification:'),
|
'$passwd' => t('Please enter your password for verification:'),
|
||||||
'$global' => array('global', t('Remove this account, all its channels and all its channel clones from the network'), false, t('By default only the instances of the channels located on this hub will be removed from the network')),
|
'$global' => array('global', t('Remove this account, all its channels and all its channel clones from the network'), false, t('By default only the instances of the channels located on this hub will be removed from the network')),
|
||||||
'$submit' => t('Remove Account')
|
'$submit' => t('Remove Account')
|
||||||
@ -63,4 +65,4 @@ function removeaccount_content(&$a) {
|
|||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
<h1>{{$title}}</h1>
|
<div class="generic-content-wrapper">
|
||||||
|
<div class="section-title-wrapper">
|
||||||
<div id="remove-account-wrapper">
|
<h2>{{$title}}</h2>
|
||||||
|
</div>
|
||||||
<div id="remove-account-desc">{{$desc}}</div>
|
<div class="section-content-danger-wrapper" id="remove-account-desc">
|
||||||
|
<strong>{{$desc.0}}</strong>{{$desc.1}}<strong>{{$desc.2}}</strong>
|
||||||
<form action="{{$basedir}}/removeaccount" autocomplete="off" method="post" >
|
</div>
|
||||||
<input type="hidden" name="verify" value="{{$hash}}" />
|
<div class="section-content-tools-wrapper">
|
||||||
|
<form action="{{$basedir}}/removeaccount" autocomplete="off" method="post" >
|
||||||
<div id="remove-account-pass-wrapper">
|
<input type="hidden" name="verify" value="{{$hash}}" />
|
||||||
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
|
<div class="form-group" id="remove-account-pass-wrapper">
|
||||||
<input type="password" id="remove-account-pass" name="qxz_password" />
|
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
|
||||||
</div>
|
<input class="form-control" type="password" id="remove-account-pass" name="qxz_password" />
|
||||||
<div id="remove-account-pass-end"></div>
|
</div>
|
||||||
|
{{include file="field_checkbox.tpl" field=$global}}
|
||||||
{{include file="field_checkbox.tpl" field=$global}}
|
<button type="submit" name="submit" class="btn btn-danger">{{$submit}}</button>
|
||||||
|
</form>
|
||||||
<input type="submit" name="submit" value="{{$submit}}" />
|
</div>
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user