phpcms后台获取当前登录账号的数据的代码:
<?php //phpcms后台获取当前登录账号的数据的代码: $amdinid=$_SESSION['userid']; $infoadmin=$this->admin->get_one(array('userid'=>$amdinid)); //测试一下 echo '<pre>'; var_dump($infoadmin); echo '</pre>'; //看到的结果: array(11) { ["userid"]=> string(1) "1" ["username"]=> string(6) "phpcms" ["password"]=> string(32) "f8ad70a7e2bc6242458cbc53e7336a80" ["roleid"]=> string(1) "1" ["encrypt"]=> string(6) "SRzGtW" ["lastloginip"]=> string(9) "127.0.0.1" ["lastlogintime"]=> string(10) "1364605066" ["email"]=> string(16) "qiyoutang@qq.com" ["realname"]=> string(0) "" ["card"]=> string(0) "" ["lang"]=> string(0) ""