flagflag  If you want to see English page, please click "English" Button at Left.

Re: Modlos 1.5.0 database issues

このトピックの投稿一覧へ

なし Re: Modlos 1.5.0 database issues

msg# 1.2.1
depth:
2
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2010-12-1 11:22 | 最終変更
iseki  Home away from home   投稿数: 1581
Hi Adam,

Sorry, I don't understand cause of the bug. (;_;
modlos 1.5.0 work at my environment.

My environment:
CentOS 5.5
Moodle 1.9.10+ (was downloaded at today)
PHP 5.3.3
MySQL 5.1.47
Apache 2.2.14


"User not Found" message is in modlos/class/create_avatar.class.php (L250-)
  if ($this->ownername!='') {
      $names = get_names_from_display_username($this->ownername);
      $user_info = get_userinfo_by_name($names['firstname'], $names['lastname']);
      if ($user_info==null) {
          $this->hasError = true;
          $this->errorMsg[] = get_string('modlos_nouser_found', 'block_modlos').' ('.$names['firstname'].' '.    $names['lastname'].')';
          return false;
      }
      $this->uid = $user_info->id;
  }
  else $this->uid = '0';

It seems that get_userinfo_by_name() function des not work well.
get_userinfo_by_name() function is in modlos/include/moodle.func.php (L87)

function  get_userinfo_by_name($firstname, $lastname='')
{
    if ($lastname=='') {
        $names = explode(' ', $firstname);
        $firstname = $names[0];
        $lastname  = $names[1];
    }

    $user_info = get_record('user', 'firstname', $firstname, 'lastname', $lastname, 'deleted', '0');
    return $user_info;
}

Is get_record() function wrong?

.....
投票数:99 平均点:5.45

投稿ツリー

  条件検索へ


サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
<今日>

オンライン状況

62 人のユーザが現在オンラインです。 (2 人のユーザが Forum を参照しています。)

登録ユーザ: 0
ゲスト: 62

もっと...

アクセスカウンタ

今日 : 3334333433343334
昨日 : 1169911699116991169911699
総計 : 2329066923290669232906692329066923290669232906692329066923290669
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com