Gallery & geeklog 1.3.9 photo add/login(?) issue

AnnihiLizard

Joined: 2004-07-16
Posts: 1
Posted: Fri, 2004-07-16 00:21

I'm using gallery with the built in geeklog integration and I either can't figure out how to log in to gallery or I can't upload photos into gallery

whenever I upload photos I get: "Upload error: user cannot add to album"

I've tried changing my user permissions so my user can add images to this album, am I missing some sorta gallery login somewhere? or am I just a retard? ...

 
dewdoobrown

Joined: 2004-01-12
Posts: 38
Posted: Mon, 2004-07-26 14:16

I believe if you go to ur gallery/classes/geeklog/User.php. Open it up and find this part in the file:

 function loadByUserName($uname) {
   global $_TABLES;

   $result = DB_query("SELECT uid,fullname,email " .
       "FROM {$_TABLES['users']} " .
       "WHERE username = '$uname'");
   $userInfo = DB_fetchArray($result);

   $this->uid = $userInfo['uid'];
   $this->username = $userInfo['username'];
   $this->fullname = $userInfo['fullname'];
   $this->email = $userInfo['email'];
   $this->isAdmin = SEC_inGroup('Root', $uid);
   $this->canCreateAlbums = 0;

change $this->canCreateAlbums = 0; to $this->canCreateAlbums = 1;

Save it and you should be good to go. But I am still using Gallery 1.4.1 but I have a test site for new builds and it still works....So good luck!