Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがJoomla2.5にログインしているかどうかを確認するにはどうすればよいですか?古いバージョンのjoomlaのコードスニペットしか見つからないようです。同じですか?
if(JFactory::getUser()->id) { //user has logged in }
はい、これを試す前と同じです-
$user =& JFactory::getUser(); if($user->id!=0){ //user is logged in }
$user = JFactory::getUser()->guest;
PHP 5.3を使用している場合。
railscasts.com でカミナリに関するエピソードを見て、このシステムをブログに追加しようとしました。しかし、このエラーが何度も表示され、その理由がわかりません。
投稿コントローラーからのインデックス アクション:
def index @posts = Post.order