Search the Community
Showing results for tags 'guest'.
-
ProcessWire is setting a "wires" cookie for each guest session. Is it possible drop that cookies, so there are no cookies at all for guests? That way, I don't need to spam the user with a cookie consent box. I don't need cookies for user preferences and marketing purposes. (Why are cookies being set by default in the first place?)
-
In a PW file, I successfully login a $user using $session->login(). I later redirect to a different PHP file. It's not a PW template file so I do the appropriate include("/path/to/processwire/index.php"); But then I try to get the logged in $user->name and it always gives me 'guest'. And if I set a $session value at login, in the redirected file my values are lost. I am new to PW so I am surprised. What am I missing? Thx
-
I've created a Process Module, and its execute() function renders the HTML response to an AJAX request. The AJAX request is being made outside of the admin panel, and in all likelihood will be made by "guest" users. Within my ModuleName.info.json file, I have added these lines: "permission": "generate-thumbnails", "permissions": { "generate-thumbnails": "Generate Thumbnails" }, Then within the Admin panel, I gave guests access to run that module. Unless logged in, the response to the AJAX request is always the login form's HTML, rather than the HTML my execute() function creates. So two questions: Is it possible to give non-logged-in users the ability to run that function via the AJAX request, or Is there a better ProcessWire way to create HTML to use as an AJAX response? Thank you!
-
Hi, I'm having problems with a custom login. I test almost everything I found in the forum: $this->users->setCurrentUser($user); $this->session->forceLogin($user); $this->session->login( $name, $pass ); $this->session->_user_id = $user->id; Nothing works, I always get a failed login for guest. The $user exists, is created I can track the id and everything. Help needed!!!! Thanks
-
Hi, I've been using PW for a pretty long time now, and this kind of thing is happening for the very first time. I'm setting up an API for the App I'm creating for my client. So I've created a hidden page called API which is located right under the Home. When I'm trying to write code for API and test it, the output is only visible for logged in user, i.e., the output is only available if I'm logged in, which is not going to be the case when I'm using app to request JSON. So, question is, how to keep the page hidden but accessible to guest user? I checked the permissions under settings tab. Who can access this page? Tab says it's accessible to guest & superuser but for some reason, it's only working for superuser. What am I doing wrong? Thanks.
-
Hello there. Since this is my first post in these forums: Thank you Ryan for ProcessWire and thanks to everyone that is supporting him or other users. I'm having a strange problem using $image->description. When I'm logged in as the default user I registered during install everything's working as expected. $image->description returns the string provided in the backend. Anyways if not logged in, an empty string will be returned resulting in <img src="url-is-still-working" alt="">. I don't really know whats going on. Might be a bug? Here's some code: $slides = ''; foreach ( $page->slideshow_images as $image ) { $slides .= '<li><img src="' . $image->url . '" alt="' . $image->description . '"></li>'; } I'm running ProcessWire 2.5.3.
- 3 replies
-
- image
- description
- (and 5 more)
-
Hi everyone, I'm currently setting up my first multilingual project on a brand new 2.4 install. One of the things I tried to find out is how to change the default language. Fortunately I'm not the first one and I found good solutions. While reading through a lot of stuff I stumbled upon the suggestion to change the language of the guest user here and here. So I tried that and always get the error: "The guest role is required". Despite the error the language change gets saved. Two other users also reported this here and here. Like Relmos reports, after switching the guest user language, my site also displays in the default language. I checked with <?php echo $user->language->name; ?> in Chrome Incognito mode. This raises 2 questions: 1. Is setting the guest user language really affecting the language displayed on the home page or is it only determined by what language I set the default language to (like explained here)? 2. Can anybody reproduce the error message when switching language of guest user and what does it mean? The guest role is still there after switching. So I don't quite understand the meaning of that error message. Patiently awaiting partial enlightenment through this great community gerhard