Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php |
— | — | @@ -666,6 +666,7 @@ |
667 | 667 | $this->mForm = $form;
|
668 | 668 | $this->mConds = $conds;
|
669 | 669 | $this->mConds['acr_rejected'] = $rejects;
|
| 670 | + $this->rejects = $rejects;
|
670 | 671 | parent::__construct();
|
671 | 672 | }
|
672 | 673 |
|
— | — | @@ -676,12 +677,17 @@ |
677 | 678 |
|
678 | 679 | function getQueryInfo() {
|
679 | 680 | $conds = $this->mConds;
|
680 | | - $conds[] = 'acr_user = user_id';
|
681 | | -
|
| 681 | + $tables = array('account_requests');
|
| 682 | + $fields = array('acr_id','acr_name','acr_real_name','acr_registration',
|
| 683 | + 'acr_email','acr_email_authenticated','acr_bio','acr_notes','acr_urls');
|
| 684 | + if( $this->rejects ) {
|
| 685 | + $tables[] = 'user';
|
| 686 | + $conds[] = 'acr_user = user_id';
|
| 687 | + $fields[] = 'user_name';
|
| 688 | + }
|
682 | 689 | return array(
|
683 | | - 'tables' => array('account_requests','user'),
|
684 | | - 'fields' => 'acr_id,acr_name,acr_real_name,acr_registration,acr_email,acr_email_authenticated,
|
685 | | - acr_bio,acr_notes,acr_urls,acr_user,user_name',
|
| 690 | + 'tables' => $tables,
|
| 691 | + 'fields' => $fields,
|
686 | 692 | 'conds' => $conds
|
687 | 693 | );
|
688 | 694 | }
|