$active_users, 'rejected' =>$rejected_users];
foreach ( $arr as $key => $list){
$this->registerJs("var key = ".json_encode($key).";", View::POS_READY, 'my-keys');
echo '
';
if(!empty($list)){
echo "
List of $key users
";
if(isset($fq)){
$fq=$fq."&";
}
else{
$fq="";
}
//echo '
';
echo "
";
echo "";
echo "
Username |
Name |
Email |
Institution | ";
if($key =='rejected'){
echo " | ";
}
echo "
";
echo "";
foreach ( $list as $user ) {
echo "";
$url = Yii::$app->getUrlManager ()->createAbsoluteUrl ( [
'account/profile',
'user' => $user->__get('username')
] );
echo "".$user->__get('username').""." | ";
echo "".$user->__get('name')." | ";
echo "".$user->__get('email')." | ";
echo "".$user->__get('institution')." | ";
if($key =='rejected'){
echo "".Html::a("Activate", ["account/activate?username=".$user->__get('username')], ['class' =>'btn btn-primary'])." | ";
}
echo "
";
}
echo"
";
echo "
";
}
else{
echo "
No $key users!
";
}
echo '
';
}
?>