Comments (8)
I noticed it not working at the moment due to cookies.
Would it be possible if I would let it set cookies for all domains at once? Like with a setcookie.php file and add HTML to get setcookie.php from all domains?
from userapplepie-v4.
I have not tested this personally. I do use virtual hosts to host many different sites that run UAP. Just never the same install. I am guessing if it does not work by default, that it would be in the cookie settings to do so. Let me take a look and see if I see anything.
from userapplepie-v4.
Looking at the cookie file, maybe if you remove the domain var from it. I will give it a try and let you know if it still works.
https://github.com/UserApplePie/UserApplePie-v4/blob/master/app/System/Libraries/Auth/Cookie.php
from userapplepie-v4.
I tested this code on the demo site and it still worked. All I did was removed the domain vars. Try and out and let me know if it works. If not we will come up with a solution together.
Cookie.php location: app/System/Libraries/Auth/Cookie.php
<?php
/**
* Auth Cookie Class
*
* UserApplePie
* @author David (DaVaR) Sargent <[email protected]>
* @version 4.0.0
*
* @author Jhobanny Morillo <[email protected]>
*/
namespace Libs\Auth;
class Cookie {
public static function exists($key) {
if (isset($_COOKIE[$key])) {
return true;
} else {
return false;
}
}
public static function set($key, $value, $expiry = "", $path = "/") {
$retval = false;
if (!headers_sent()) {
$retval = @setcookie($key, $value, $expiry, $path);
if ($retval)
$_COOKIE[$key] = $value;
}
return $retval;
}
public static function get($key, $default = '') {
return (isset($_COOKIE[$key]) ? $_COOKIE[$key] : $default);
}
public static function display() {
return $_COOKIE;
}
public static function destroy($key, $value = '', $path = "/") {
if (isset($_COOKIE[$key])) {
unset($_COOKIE[$key]);
setcookie($key, $value, time() - 3600, $path);
}
}
}
from userapplepie-v4.
hmmm.
I tried changing the file like this.
But after I login, it says "Success! You Have Successfully Logged In!". But apparently it logs me out automatically, because the user dropdown isn't shown and it asks for the login again. This happens on both domains now.
But another solution I'm open to is: copying over all files
so /var/www/UAP1
and /var/www/UAP2
And let them connect to the same database.
That should be possible right?
Can i install UAP2 and just follow the instructions from the auto installer, or would that wipe the existing database?
from userapplepie-v4.
Installed it in 2 subfolders now.
Had to install modcloudflare to get the real IP address cause it was conflicting.
Now I can login on both sites with the same username/password. However, when I log in to SITE1 it auto logs me out of SITE2.
Would there be an easy fix, like where i copy over the session table.
So SITE1 uses uap4_session
and SITE2 uses uap4_session2
and SITE3 uses uap4_session3 etc
and then edit the auth script to check in the correct table?
so they share the whole database, except the session table. Or would that still have issues when validating ?
from userapplepie-v4.
Okay so I tried doing this. went into the second folder and changed all "PREFIX"sessions to "PREFIX"sessions2 and edited app/system/libraries/auth addIntoDB("sessions2...) as well.
I can confirm, it works to be logged in on both sites simultaneously. You do need to login twice (1x per site), but the rest works without issues :)
Knowing this, I can continue implementing my current tools into UAP.
PS: good job. I really like it. Just need to figure a bit out how the homepage content stuff works, since I never actually use Libraries from others and use plain PHP code.
Also nice dashboard stats, you're not the only one who likes those ;)
However, it multiplies them by 5 by default (cause of .css and .js etc). So perhaps add a setting to let the dashboard show the logs amount devided by X or make something so .css and .js files aren't counted in the pageviews?
from userapplepie-v4.
Thanks I will look in to the stats. I will have more time to work on it soon.
I need to get the docs done. I keep putting it off. Lol
from userapplepie-v4.
Related Issues (20)
- Automated Site Map for Google HOT 1
- recaptcha fix HOT 1
- Only allow IP to register once per day HOT 1
- Forum auto save draft HOT 4
- User Profile Content HOT 2
- New User Notifications HOT 1
- User Status Updates HOT 1
- Site Messages HOT 1
- Comments HOT 1
- Add Terms and Conditions Page
- Add customisable permissons HOT 4
- Move Email Server Settings to its own page in Admin Panel
- Setup Site Links Editor in Admin Panel HOT 2
- Users Profile Photos HOT 2
- Forum Plugin Image Uploads Admin Panel Settings HOT 1
- Forum Plugin Fixes for Special Charaters. HOT 1
- User Account Home Page
- Add a Newsfeed page.
- Notifications in Nav Bar HOT 1
- Site Logs Top Refer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from userapplepie-v4.