Announcement

#1 2009-07-25 19:48:11

thamizhinpan
Member
2009-07-25
3

How to integrate user databases of wordpress and piwigo.

I wish to integrate user databases of wordpress and piwigo.
And I wish to put only one login page for both. How can I do this?

Offline

 

#2 2009-07-27 22:56:49

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: How to integrate user databases of wordpress and piwigo.

Hello thamizhinpan,

Which one of Piwigo/WordPress should be the master in term of user database?

I'm not a WordPress guru yet, but by reading their code, I think you can use an external user table for authentication. You can also do this in Piwigo (and as I am a Piwigo guru, this is the simplest solution for to explain)

Offline

 

#3 2009-07-27 23:01:20

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: How to integrate user databases of wordpress and piwigo.

And this may be interesting for you : [Forum, topic 14644] Wordpress integration problems...

Offline

 

#4 2009-07-28 00:05:43

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: How to integrate user databases of wordpress and piwigo.

I've made a simple test with Piwigo 2.0.3 + WordPress 2.8.2.

1. install Piwigo and Wordpress in the same database. Use "wp_" as table prefix for WordPress and "piwigo_" as table prefix for Piwigo

2. in Wordpress, you have a single user "admin". Create another user "guest". it should have ID = 2 in the wp_users table.

3. in Piwigo, install and activate the "LocalFiles Editor" plugin, in the Administration>Specials>Plugins screen

4. in the Administration>Specials>Plugins>LocalFiles Editor>Local config, set the include/config_local.inc.php file content as:

Code:

<?php

$conf['users_table'] = 'wp_users';

$conf['user_fields'] = array(
  'id' => 'ID',
  'username' => 'user_login',
  'password' => 'user_pass',
  'email' => 'user_email'
  );

?>

If in the wp_users table, the ID for the "guest" user is not 2, add:

Code:

$conf['guest_id'] = 3;

... where 3 is the ID of the "guest" user.

If you create users on Piwigo side, you will be able to connect on WordPress side. If you create users on WordPress side, you won't be able to connect on Piwigo side. Because the encryption algorithm differs. Next step is to make Piwigo create WordPress-like password.

Offline

 

#5 2009-07-28 20:47:48

Gotcha
Former Piwigo Team
Pourrières (83) [FR]
2007-03-14
604

Re: How to integrate user databases of wordpress and piwigo.

On step 2)
What password find ? So, on Piwigo, user "guest" isn't login

:-(

Wordpress is not also good as Piwigo ^^

Offline

 

#6 2009-08-07 08:56:19

Criss
Former Piwigo Team
Calvi
2008-03-31
95

Re: How to integrate user databases of wordpress and piwigo.

For user guest, go on your database editor and remove password no ?

Another point: it works fine... until you connect to wordpress: this one changes the password in DB with wordpress' encryption algorithm...


Signup and get your Piwigo photo gallery automatically installed and hosted. Help us to beta test it !

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact