Example #1
0
 public function profileImagePath()
 {
     $path = $GLOBALS['CONFIG']['path']['profileimgs'] . '/' . $this->id . '.';
     foreach ($GLOBALS['CONFIG']['image_info'] as $extension => $mime) {
         $p = $path . $extension;
         if (file_exists($p)) {
             return $p;
         }
     }
     return User::getDefaultProfileImage($this->gender);
 }