0
我第一次玩codeigniter和ion auth。但是,我已經完成了所有工作,在離子驗證模板中,索引視圖顯示所有用戶的列表。ion auth和codeignitor
<?php foreach ($users as $user):?>
<tr>
<td><?php echo $user->first_name;?></td>
<td><?php echo $user->last_name;?></td>
<td><?php echo $user->email;?></td>
<td>
<?php foreach ($user->groups as $group):?>
<?php echo anchor("auth/edit_group/".$group->id, $group->name) ;?><br />
<?php endforeach?>
</td>
<td><?php echo ($user->active) ? anchor("auth/deactivate/".$user->id, 'Active') : anchor("auth/activate/". $user->id, 'Inactive');?></td>
<td><?php echo anchor("auth/edit_user/".$user->id, 'Edit') ;?></td>
</tr>
<?php endforeach;?>
通常情況下,$ users數組將來自模型。然而,在研究模型(ion_auth_model)時,我無法看到任何特定於$用戶的東西。 auth控制器也不會給我太多。
在documentation中,users()函數是: $ users = $ this-> ion_auth-> users();
我認爲這是在索引頁面上填充的數組。如果不是在模型中,這是如何拉動MySQL數據的?這個怎麼用?
在此先感謝。
感謝jmadsen開始圍繞行1125我無法找到該函數中的任何位置ion_auth_model。版本是[鏈接] https://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/2任何想法或我是一個總白癡? – Smudger 2013-02-26 11:31:25
我假設zip文件與git repo相同:https://github.com/benedmunds/CodeIgniter-Ion-Auth/blob/2/models/ion_auth_model.php line 1150 – jmadsen 2013-02-26 12:55:25