本文整理汇总了PHP中BaseController::check_logged_in方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::check_logged_in方法的具体用法?PHP BaseController::check_logged_in怎么用?PHP BaseController::check_logged_in使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::check_logged_in方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_user_is_manager
public static function check_user_is_manager()
{
BaseController::check_logged_in();
if (!BaseController::get_user_logged_in()->manager) {
Redirect::to(\Slim\Slim::getInstance()->urlFor('index'), array('message' => 'Sinulla ei ole oikeuksiä käyttää toimintoa!', 'error' => true));
}
}
示例2: update
public static function update($id)
{
parent::check_logged_in();
$c = parent::get_user_logged_in();
$user = User::find($id);
$user->password = $_POST['password'];
$user->password_confirmation = $_POST['password_confirmation'];
$user->username = $_POST['username'];
if (parent::is_admin()) {
$user->admin = isset($_POST['admin']);
} else {
$user->admin = false;
}
@($errors = $user->validate());
if (!$user || count($errors) > 0) {
//Redirect::to("/", array('message' => "Failed to store user."));
View::make("user/edit.html", $_POST);
} else {
$user->update();
Redirect::to("/", array('message' => "updated user."));
}
}
示例3: check_logged_in
function check_logged_in()
{
BaseController::check_logged_in();
}
示例4: tarkistaKirjautuminen
function tarkistaKirjautuminen()
{
BaseController::check_logged_in();
}
示例5: destroy
public static function destroy($id)
{
parent::check_logged_in();
Task::destroy($id);
Redirect::to('/task', array('message' => 'Task has been removed.'));
}
示例6: tarkista_onko_kirjautunut
function tarkista_onko_kirjautunut()
{
BaseController::check_logged_in();
}
示例7: destroy
public static function destroy($id)
{
parent::check_logged_in();
Group::destroy($id);
Redirect::to('/group', array('message' => 'Group has been removed.'));
}