kishor10d/Admin-Panel-User-Management-using-CodeIgniter

Need Special Calling for User

3vluzi opened this issue · 3 comments

Hi, thanks for your amazing work.
I am new to CI, and I want to know more about How to call any simple function for example:
Call who is login aka display username who is currently login and the level of that user.
and then place it anywhere.

In my project i want to create attendance system that call userlogin to be recorded on db.

thanks.

Oh, i`ve tried and this work

//On my_helper.php

function sedanglogin()
{
$pdo = &get_instance();
$pdo->load->library('session');
$sesiNYA = $pdo->session;
return $sesiNYA;
}

////anywhere
$loggedin = sedanglogin();

  foreach ($loggedin as $s) {
    $useridnya = $s['userId'];
    $rolenya = $s['role'];
    $roleteksnya = $s['roleText'];
    $namanya = $s['name'];
    $loginterakhir = $s['lastLogin'];

}

//echo $namanya and so on

@3vluzi : If you have special requirements then please do not create issues. We can connect in other ways.