Home › Forum › Problemi Vari con WP › [Database] Unire più tabelle _users
-
AutorePost
-
-
30 Novembre 2008 alle 14:32 #8636KevinJackPartecipante
Salve
“Situazione”
in un dominio ho + di 4 blog wp installati, vorrei che gli utenti del primo blog siano uguali agli altri blog
Se, per esempio,
nel blog01 ho 3 utenti (A B C)
nel blog02 ho 2 utenti (A D)
nel blog03 ho 3 utenti (B C E)
nel blog04 ho 4 utenti (A C E F)
vorrei che tutti gli utenti (A B C D E F) possano entrare negli altri blog, ad esempio vorrei che l’utente F possa entrare nel blog 01, 02 e 03 senza doversi registrare più volte…
Come dovrei fare? Mi date gentilmente qualche consiglio? Grazie mille!
-
30 Novembre 2008 alle 17:21 #59793SteveAglAmministratore del forum
Non banalissimo… ma fattibile.
La condizione base è che tutti i blog usino il medesimo DB con table_prefix differenti. Se questo è il caso i blog successivi al primo che avrà la classica wp_ come table prefix dovranno avere nel config, prima della defiizione della loro table prefix i seguenti comandi:
define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);
In tal odo tutti gli utenti del blog A saranno visibili sugli altri blog.
Il problema sono gli userd ID se ilblog esistono già e quindi hanno articoli già scritti, perchè l’utente F del blgo 4 potrebbe avere user ID 1 che non sarà quello effettivo sul blog 1 perchè quell’user ID è già assegnato all’utente A a questo non vi è soluzione banale ma solo parecchio lavoro dda fare per riassegnare gli user ID manualmente tramite comandi SQL da phpadmin.
Diciamo che la cosa è facilmente fatibile se si ha il blog A e si vogliono aggiungere nuovi blog… meno se si ha una situazione pre-esistente e sopratutto con molti dati.
-
30 Novembre 2008 alle 20:47 #59794KevinJackPartecipante
ok hai fatto centro! grazie mille!
-
30 Novembre 2008 alle 23:30 #59798gollum1Partecipante
esiste anche un plugin che permette di avere sincronizzare lo stesso utente su più blog… mi pare ne fosse passata notizia nel blog qualche mese fa…
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.