Jump to content

Search the Community

Showing results for tags 'user'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I'm incorporating PW into a Laravel site layout. For the Login/Logout links, I have: <?php if ( !wire('user')->isGuest() && wire('user')->id && wire("user")->isLoggedin() ) { echo '<li><a href="/pages/control/">Admin</li> <li><a href="/pages/control/login/logout/">Logout</li>'; } else echo '<li><a href="/pages/control/login/">Login</li>'; ?> I started with just wire('user')->isLoggedin(), and that didn't seem to work, so searching around the forums added in the other items. Basically, whether I'm logged in or not, I always see a Login link. If I dd/datadump (a Laravel function) the wire('user') I get what looks like the PW user class. So I've included the PW index.php correctly into my Laravel bootstrap/start.php. As an aside, $wire->user->isLoggedIn() doesn't work. It's probably some conflict with Laravel. Switching to use wire('user')->isLoggedIn() let me work, though it gives the wrong result. EDIT 1: It works fine on the pages that are pure PW, just not any that are Laravel driven.
  2. I need the equivalent of a auto_increment mysql field for user_id's. In mysql, it's a setting of the field. How do I accomplish this with processwire. Thanks, Aloha
  3. 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
  4. For some reason when a non-superuser has access to modify users it does not show the Content and Delete buttons (tabs) when editing a user. Is this intended? And what would be the easiest way to re-enable this? Thanks
  5. I've a site with different sections. Each user is assigned to a section and each section has an editor. I want those editors to be able to modify the users that are assigned to their section. I tried hooking into ProcessUser::execute but I'm not sure how to filter the 'pages'. $this->addHookBefore('ProcessUser::execute', $this, 'modifyuserpagelist'); In what way am I able to modify the User List?
  6. Hi Guys, I am looking for the best way what you feel when doing this. Basically the idea is to save the history of a user. Consider we have a bunch of products, and categories. And the user needs a way to save a product and check it for later use. Consider the same as you follow a topic in the PW forum. I was thinking to add a page which have 2 fields 1 ) user_id which is of type Page which is linked to the user template of PW 2 ) product_id which is also a Page which I have built from another template I have removed the global title, but it needs the url always entered. $page = new Page(); $page->template = 'product-history-user'; $page->parent_id = 'parent-id'; $page->name = 'something'; $page->history_user_id = $user->id; $page->user_history_product_id = 'id-of-product'; $page->save(); I also have some more stuffs that needs similar logic. Interested to hear your thoughts to make this better. Update : One more problem I missed to write is, I need to sort it based on the priority, that is why I opted the way. or is there a way we can store the date and time of the product when saved? Thanks
  7. Hi all! if($session->login($username, $pass)) { echo ($user->hasRole('clubmember')==1?"yes":"no"); ....... } The above code snippet prints out "no" at the first login and "yes" at the second login. The user has the role mentioned in the code, so I'm not seeing, what's happening here. Sorry for all my stupid questions, sometimes it's hard to see the obvious(??).
  8. Hi, As a superuser, I created sample_user and assigned sample_user role which include editing pages. I don't know why when I test sample_user in the admin, I can't edit the pages. I can only view them. I went far that I granted sample_user all the roles including administering users, but still, it can only view pages. What could the problem be? Maybe I missed a step? Thanks.
  9. How can I add fields to the user page in the PW Admin? I'd like to add a field for a user's full name. The blog profile created by Ryan uses a similar field named "Display name (first and last name)," but I can't figure out how that field is added to the page. I've combed through the forum and I can't find the answer to my question. Is this something done through the PW Admin or through a script?
  10. Hi all, I am creating a site that will have multiple users in ProcessWire and I want to be able to limit the ability to edit pages so users can only edit the pages that they themselves created. I noticed the default functionality allows you to assign roles yet anyone with this role appears to be able to edit whatever pages and templates have access to that role. Thank you for your help!
  11. I'm trying to figure out the best way of turning the below code into something easy for the user to edit without screwing up the source. Would this be best accomplished with php or customising the text editors? <ul class="list1 span6"> <li class="list_title"><span class="bold">Summer</span><span class="pull-right"></span></li> <li><span class="bold">Monday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Tuesday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Wednesday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Thursday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Friday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Saturday</span><span class="pull-right">10am - 3.45pm</span></li> <li><span class="bold">Sunday</span><span class="pull-right">10am - 3.45pm</span></li> </ul> <ul class="list2 span6"> <li class="list_title"><span class="bold">Winter</span><span class="pull-right"></span></li> <li><span class="bold">Monday</span><span class="pull-right">8:30pm - 10pm</span></li> <li><span class="bold">Tuesday</span><span class="pull-right">8:30pm - 10pm</span></li> <li><span class="bold">Wednesday</span><span class="pull-right">8:30pm - 10pm</span></li> <li><span class="bold">Thursday</span><span class="pull-right">8:30pm - 10pm</span></li> <li><span class="bold">Friday</span><span class="pull-right">8:30pm - 10pm</span></li> <li><span class="bold">Saturday</span><span class="pull-right">8:30pm - 12am</span></li> <li><span class="bold">Sunday</span><span class="pull-right">8:30pm - 12am</span></li> </ul>
  12. Hello Forum, I have some trouble with setting up user rights properly. I have defined a role "editor" with the following permissions: view pages edit pages sort child pages update profile And I have the following page structure: /section/subsection/detail/ /subsection/ uses a no-file template "subsection" with this settings: editor => view, add children (there is nothing to edit here, subsections just provide grouping for the detail pages) may have children? => yes may be used for new pages? => no allowed templates for children => detail children are sorted by => none /detail/ uses a no-file template "detail" with this settings: editor => view, edit, create may have children? => no may be used for new pages? => yes allowed templates for parents => subsection All data entered on /detail/ is pulled into /section/ and displayed there. Section therefore uses a template "section" with a file associated. Problem: If I log in with an editor account everything is fine except that I can't change the order of the detail pages (no "move" button, only "edit"). What do I oversee? Your help is much appreciated.
  13. Hello, I have a strange problem here. Long story: - I added an Image field to my user template - On my page I have a little login box in a sidebar, which is displayed whenever the current user isn't guest. It the checks if the user has an image uploaded: <?php if($user->image->url):?> <img src="<?=$user->image->size(60,60)->url;?>" style="float:right;"> <?php endif;?> This works. Now to the strange part: In the main content of the page I want to display a profile page for any givven user registered. I took this approach from Ryan's BlogProfile: $name = $sanitizer->pageName($input->urlSegment1); $profile = $users->get($name); <?php if($profile->image->url):?> <img src="<?=$profile->image->size(100,100)->url;?>" style="float:left;margin-right:10px;"> <?php endif;?> This is on the same page as the login box. Now I'm getting very strange results. Checking if a file is uploaded constantly fails, so I get errors when there's no image. It's hard to explain and my only two explanations are I'm either stupid or there's something I need to know about images in a user object, or getting info from $users. Sorry for the weak explanation, can someone help me out? Thanks, thomas
×
×
  • Create New...