aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-08 03:51:31 -0800
committerfriendica <info@friendica.com>2013-02-08 03:51:31 -0800
commit62afdf38202ee9f09011bef599506e3a5ee37528 (patch)
treed13030c2401df0190083deeff9757ae2d56f54ac /mod
parent07e0ffd7c77f3e015feb3a109012b10db5275a0a (diff)
downloadvolse-hubzilla-62afdf38202ee9f09011bef599506e3a5ee37528.tar.gz
volse-hubzilla-62afdf38202ee9f09011bef599506e3a5ee37528.tar.bz2
volse-hubzilla-62afdf38202ee9f09011bef599506e3a5ee37528.zip
more register_approve stuff - like the admin page. Hopefully this won't conflict with Thomas's admin page "list users" changes
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php12
-rw-r--r--mod/register.php2
2 files changed, 6 insertions, 8 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 9a8a58cfc..aa3d7b294 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -496,13 +496,13 @@ function admin_page_users_post(&$a){
}
if (x($_POST,'page_users_approve')){
- require_once("mod/regmod.php");
+ require_once('include/account.php');
foreach($pending as $hash){
user_allow($hash);
}
}
if (x($_POST,'page_users_deny')){
- require_once("mod/regmod.php");
+ require_once('include/account.php');
foreach($pending as $hash){
user_deny($hash);
}
@@ -552,11 +552,9 @@ function admin_page_users(&$a){
}
/* get pending */
- $pending = q("SELECT `register`.*, `contact`.`name`, `user`.`email`
- FROM `register`
- LEFT JOIN `contact` ON `register`.`uid` = `contact`.`uid`
- LEFT JOIN `user` ON `register`.`uid` = `user`.`uid`;");
-
+ $pending = q("SELECT * from account where (account_flags & %d ) ",
+ intval(ACCOUNT_PENDING)
+ );
/* get users */
diff --git a/mod/register.php b/mod/register.php
index 494e72b8f..3ba714c74 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -51,7 +51,7 @@ function register_post(&$a) {
break;
case REGISTER_APPROVE:
- $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED;
+ $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED | ACCOUNT_PENDING;
break;
default: