本文整理汇总了PHP中Model_User::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::getUsers方法的具体用法?PHP Model_User::getUsers怎么用?PHP Model_User::getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_User
的用法示例。
在下文中一共展示了Model_User::getUsers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_index
public function action_index()
{
$role = $this->request->param('id');
$users = new Model_User();
$data['users'] = $users->getUsers($role);
$this->template->content = View::factory('admin/admUsers', array('data' => $data, 'user' => $this->user));
}
示例2: listAction
public function listAction()
{
$currentUsers = Model_User::getUsers();
if ($currentUsers->count() > 0) {
$this->view->users = $currentUsers;
} else {
$this->view->users = null;
}
}
示例3: action_getUsers
public function action_getUsers()
{
$this->auto_render = FALSE;
$users = Model_User::getUsers("", "");
$final['data'] = array();
//
foreach ($users as $val) {
$final['data'][] = $val;
}
//
print json_encode($final);
}
示例4: testCanCreateUsers
public function testCanCreateUsers()
{
Model_User::create($this->username, $this->password);
$users = Model_User::getUsers();
$this->assertArrayHasKey($this->username, $users);
$user = new Model_User();
$user->username = 'myuser';
$user->password = 'mypass';
$user->save();
$users = Model_User::getUsers();
$this->assertArrayHasKey('myuser', $users);
}