flagflag  

Re: Modlos 1.5.0 database issues

List posts in the topic

なし Re: Modlos 1.5.0 database issues

msg# 1.2.1
depth:
2
Previous post - Next post | Parent - Children.1 | Posted on 2010/12/1 11:22 | Last modified
iseki  Home away from home   Posts: 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?

.....
Votes:156 Average:6.41

Posts tree

  Advanced search


Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthNov 2025Next Month
Su Mo Tu We Th Fr Sa
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
Today

Access Counter

Today : 2933729337293372933729337
Yesterday : 151880151880151880151880151880151880
Total : 3739696037396960373969603739696037396960373969603739696037396960
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com