Need Special Calling for User
3vluzi opened this issue · 3 comments
3vluzi commented
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.
3vluzi commented
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
kishor10d commented
@3vluzi : If you have special requirements then please do not create issues. We can connect in other ways.
3vluzi commented
oh ok sir. sorry for that, i am new to git
…On Fri, 9 Jul 2021, 00:06 Kishor Mali, ***@***.***> wrote:
@3vluzi <https://github.com/3vluzi> : If you have special requirements
then please do not create issues. We can connect in other ways.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDNRVB7WMNK5CJIAARUSV3TWXLKBANCNFSM47VYSVNQ>
.