Get if user are active or not in list of users #1033
Unanswered
pippuccio76
asked this question in
Q&A
Replies: 1 comment
-
Hi, // Get the User Provider (UserModel by default)
$users_model = auth()->getProvider();
$data=[];
$data['lista']=$users_model->findAll();
return view('view_name', $data); In the view: <?php
foreach ($lista as $user){
$activeStatus = $user->active === true ? 'Active' : 'NotActive';
echo $user->username .' status :: '. $activeStatus;
}
?> More info read https://codeigniter4.github.io/CodeIgniter4/outgoing/views.html#id8 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
HI, admin side i have list of users :
how can i check in view if user are or not active ?
Beta Was this translation helpful? Give feedback.
All reactions