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. Is there a way to restrict logins for users so that one user can't be loggedin in two places at the same time? e.g. auto logout user after inactivity (of say 15 minutes..?), or logout action and disallow login if user still "logged in" somewhere?
  2. Hello there! I want to create a user front-end (user can register/login/logout via templates) I'm working based on the intermediate site profile. So _init.php is loaded first, then the template file and then _main.php. I integrated the custom login as described here, and changed it to my needs. ( I don't want to redirect the user, if the form is filled in successfully) The problem I face, is that $user->isLoggedin() lags behind $session->login(). Which means that whenever I do a login, I DO get the information that the login was successful ($session->login(...) instanceof User). I COULD use that information on _main.php to show a profile in the upper right corner. However I don't want to set a variable in the template and ask for it in _main.php. Are there any alternatives? Is a redirect really required to complete the session handling? Why? I have the same problem for the logout. The user is still displayed as logged in, when he opens the logout page. Thanks in advance. Best, Martin
  3. How to track user active time based on session login and logout. Basically, I want to get the report that each user login time and logout time/session inactivity time. Is there any module available or we can use any hooks to simulate the above. Thanks in advance for your support.
  4. Hi all, Im working on a photography website where users can comment and like on photos (which are pages). I solved the comment part with the comment module, but I also want a 'like' system. Which includes; - Like a photo. Like count on the photo adds up. - If user has a few favourite photos, i would like a 'Favourites' section on the user profile page, with all of the liked photos. - Apart from the likes, i would like to have a page 'Most liked photos of this week', so each week the community can see the photos with the most likes that week. I came across the Like plug-in, but i would like to have a little more tailored solution and keep it to logged-in users only and be able to see all of the liked photos of a user. Any idea how to keep track of the likes and build a 'Most liked this week' page? Help would be appreciated! Thnx.
  5. When echoing a date field directly from the $user variable echo $user->date; the timestamp is printed. Using echo $users->get($user->id)->date; prints the correct formated value. Is this a bug or or intended?
  6. Hello, I have a Process module with a user dashboard and I would like to have the user page edit screen at a custom URL 'myprofile'. I cannot use the default profile edit page because it does not support tabbed interfaces. The method for executing the user edit page from within my module looks like this public function ___executeMyprofile() { $processUser = $this->modules->get('ProcessUser'); return $processUser->executeEdit(); } The user edit screen displays when I go to /dashboard/myprofile. But the request is redirected several times and I end up at the URL /access/users/edit/?id=5522 which I wanted to avoid. This happens because of this line in ProcessPageEdit.module. I guess the solution lies in hooking into the ___loadPage() method from within my Process module. But, honestly, I have no clue on how to put the pieces together. So I need some pointers on how to best achieve the goal of having the current user's edit page under a custom URL in the admin area, ideally in the scenario of a custom Process module. Any help would be much appreciated. EDIT: I tried some variations of hooking like public function ___executeMyprofile() { $this->addHookBefore("ProcessPageEdit::loadPage", $this, "interceptRedirect"); $processUser = $this->modules->get('ProcessUser'); return $processUser->executeEdit(); } protected function interceptRedirect(HookEvent $event) { $event->replace = true; $event->return = $this->user; } but the hook is not being executed at all. Also when placing the call to the hook in my Process module's init() method. Also when using an After hook and not replacing the hooked method. No luck so far...
  7. Hello PW Lovers! i know that i can edit user template (Profile) and add as many fields as i want, But i wanna know if i can create pages and associate them to users, For Example: what if i have a users system & each user has a profile + custom page with personal info, and any user could edit his own page - Thanx
  8. Guests can not see page content. But users can. Guest window: User /Admin Window And this is my template file: <h3> <?php echo "$page->title Konusunda özlüsözler"; ?> </h3> <?php $kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]"); $n=1; foreach ($kisiler as $kisi) { foreach($kisi->repeater_ozlusoz as $aforism) { $tags = ''; foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; } if ($tag->id == $page->id) { echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>'; $n=$n+1; } } } I checked Template and Field Permisions. Cache disabled. Thank you for your help
  9. quick question, can the $username in login() be email OR username, or anything else?
  10. Hi there, going a bit crazy here. Trying to be a user and change the role of another user. //get the user id to change $changeRole = $users->get($sanitizer->username('username'))->id; //add role $changeRole->addRole('moderator'); //save changes $users->save($changeRole); What am I missing? Is it a user permissions setting? All I saw were permission settings for pages. Thanks up front for the help.
  11. Hello, Newbie question here. I'm rebuilding my existing website with PW, it's a game where people can guess the winners of races. I used to have a "players" table. Those are registered players, I used to identify them through their login/password, and when it matches, I give them access to the website. No rocket science. So now with PW, I'm building my sign-up form and I'm trying to create a new session when a new user sign up. I'm retrieving user/pass from the sign-up form which has been posted before but : if($session->login($user, $pass)) { // login successful $session->redirect(elsewhere); } else echo "failed"; ... fails everytime. Do I have to use something like : $u = new User(); $u->name = "bill"; $u->pass = "billpwd"; $u->addRole("guest"); $u->save(); ... before doing a session->login('bill', 'billpwd') ?? (I've just checked, it works, so I guess this is the good way to do it ?) I already have my players table so perhaps I can have the minimum in the PW's table and keep my players info in my historical table ? ... Or I can add all information I need into PW but I'd like to understand where it is stored. Last question, if there is a PW matching between "user" and "session", I need to give to the session->login function the password not hashed. I'm using the password_hash php function, any problem with that ? Thanks
  12. Hi everyone, I have a problem with a member site where I put a link in CKEditor field thatshould go to a users profile page. The profile page is a site with one urlSegment, that contains the name of the user from the admin. The structure looks like this: -profiles --username (urlSegment) -some page (CKEditor field with a link to /profiles/username) -admin (PW admin area) --users ---username (user profile) So "some page" has a CKEditor field with a link to a profile page. Now the problem is, that this link source is always changed to the admin path and not the profiles (with urlSegment). A guest user can not look into this. Can this be deactivated, or is it wanted to work like this? My solution now is to create an additional page under "profiles" that is linked by a pagefield in the user profile. So a Link will always link to the "real" page under "profiles". Could there be a easier solution than creating an extra page as there is already one under admin but still let the links in CKEditor untouched? Thanks!
  13. within my module not sure how to delete the current user and redirect without incurring this error: Fatal error: Exception: You do not have permission to execute this module - ProcessPageView (in /srv/users/serverpilot/apps/betaville-dev/public/wire/core/Modules.php line 1022) #0 /srv/users/serverpilot/apps/betaville-dev/public/wire/core/Modules.php(940): Modules->getModule('ProcessPageView') #1 /srv/users/serverpilot/apps/betaville-dev/public/wire/core/Session.php(609): Modules->get('ProcessPageView') #2 /srv/users/serverpilot/apps/betaville-dev/public/wire/core/Wire.php(398): Session->___redirect('/') #3 /srv/users/serverpilot/apps/betaville-dev/public/wire/core/Wire.php(333): Wire->runHooks('redirect', Array) #4 /srv/users/serverpilot/apps/betaville-dev/public/site/modules/Subscribers/Subscribers.module(345): Wire->__call('redirect', Array) #5 /srv/users/serverpilot/apps/betaville-dev/public/site/templates/login.php(27): Subscribers->deleteUser('benjaminbyford5...') #6 /srv/users/serverpilot/apps/betaville-dev/public/wire/core/TemplateFile.php(182): require('/srv/users/serv...') #7 /srv/users/serverpilot/apps/betavi in /srv/users/serverpilot/apps/betaville-dev/public/index.php on line 248 $u = $this->user; // user found and deleted $this->users->delete($u); // send to homepage $homepage = $this->pages->get('/'); $this->session->redirect($homepage->url);
  14. Hi, I working on auser module and have recently got this error when trying to delete a user: Error: Exception: You do not have permission to execute this module - ProcessPageView this only happens when accessing the user->delete function as the below within my module. Anyone happen to know why that may be? // @string $user = name field public function deleteUser($user){ $u = $this->users->get($user); if($u->id) { $this->users->delete($u); } } similar to this error i believe:
  15. I'm not sure that I really follow this page; http://imgur.com/a/hCxqg I've created a database when setting up the server, so I'm presuming that this is what's being asked for here? The page linked for getting setup http://webdesign.tutsplus.com/tutorials/how-to-install-and-setup-processwire-cms--cms-25509 doesn't really mention anything about these fields. After trying to use the user name on the server, and the password that I entered when setting up the mySQL to start with I got the following error (so I had filled in "DB Name"={some name that I thought up }, "DB user" = {name of user on server}, "DB pass" = {pass i set up for mySQL}); http://imgur.com/a/cgFKq After this i tried using db name; {whatever} db user; {name of user on server} db pass; {password for user on server} This didn't work either, so I'm not sure what I'm meant to put here.
  16. Hello, I'm migrated a few hundred users from an old system to PW via API. I created users, they can log in etc but only one thing is not working. Users have repeater fields. After I create users I also create those repeaters but I cannot get their value from front-end of the website. But if I go to users editing page from admin I see the values in place correctly. And when I save the user from editing page (without changing anything just saving), it starts to work normally. What am I missing here, what should I do to achieve this by API? Thanks
  17. Hey! I just finished working on a website for a client. To restrict the use of PW for the client (so he can't brake the website), I created a new User and asigned some permissions. The problem is, that the link to the page tree is missing, when I login with the new user (see screenshot). Only the "Add New" shortcut works. When Iam logged in as admin, everything works fine. I never had this problem before. Iam using PW 3.0.25 Any Ideas? THX!
  18. Hello I have a strange issue When an user (not admin) try to insert an image on page via CKeditor or TinyMCE editor poup, he get an error: Modules: Module ProcessPageEditImageSelect failed init - You do not have access to images on this page Any ideas? Thanks very much piero
  19. Hey there, I am thinking about using processwire for an art event, where people can register themselves and upload images. these images shall then be shown in an gallery and voted for. is processwire a good selection for this task? especially the user registration and image upload process? maybe with the front end editing off 3.0? Thanks for any comments and suggestions Joerg
  20. Hi, We're looking at creating a 3 level (guest, member, admin) user levels for accessing frontend content via a login. I have seen https://processwire.com/talk/topic/107-custom-login/page-1 which talks about creating the user login page. I have also seen http://modules.processwire.com/modules/frontend-user/ which is an older module which seemingly handles this but is still in alpha. We are creating a system where users need to login to see comments (members) but admin users are able to see additional information on some pages. What I'm looking for is something a little like: Can we hook into the User roles to do this? Thanks Pete
  21. Hi everyone, this is my first post here, please be gentle to me I am using ProcessWire for a the second time, running it for a project site that has a little trouble on its way. It is my fist time to work so intense with the user profiles in PW. I have extended the user template with additional information (avatar, postal address,etc.) that the user can fill in. The user have the roles of one of these: member member-x member-y The information from the profile has to be shown on various pages, even on the home page. So, if I get the profiles like this: $profiles = $users->find( "roles^=member-, limit=4, sort=random" ); // get only "...-x" and "...-y" member The output should show some profile information, but it does not. Only logged in as superuser the profiles are shown. Now my question: how can I output information from the user to a guest/visitor/everyone? For now I have created for the test site a /profile/ page and duplicated the user profile into this, so the information can be found by a simple $pages->find(). This is working for now, but makes the maintenance troublesome. On another part of the site there is a little confusion situation. Here the background: Every user can create a calendar (event) post. The structure is like this for the calendar page: /calendar/ | - /calendar-1/ (by user1) | - /calendar-2/ (by user2) | - ... (by userX) I can get the posts in /calendar/ by: $calendarPosts = $page->children("sort=date_start"); foreach ( $calendarPosts as $calendarPost ) { //... $member = $users->get( $calendarPost->created_users_id ); // get the user information //... //HTML output with user information echo $member->lastname; //... } Here the user information is reachable for the guest. For now this is quite "dirty" code (or maybe clean?) but it is working. Could this be a bug or is it because of "get()" and not "find()"? So I can get a user profile information about another page but not directly from the profile itself. Is there a solution to get the profile information from the user without creating a additional profile page or is the additional profile page a better solution? PS: Originally my client wanted this to be on Joomla, but that would bring a lot of other trouble That is why I like PW a lot! So simple, clean, mighty. Love it!
  22. Hey all. I just created a new "Avatar" user-image field in the user-template. Unfortunately, it is only showing in 'Access->Users->user-xyz' and not in 'Wrench-Sign->Profile user-xyz', so on the page http://localhost/testsite/admin/profile/ Does anyone of you know what to change that this new field is also shown in the profile-page? Thanks a lot!
  23. Hy there, This question will certainly sound stupid. Sorry for that. Regarding user and the name field of the user template. I understand that we cannot have users with the same name (meaning system name field). I am working on an e-learning site and people could have the same name. How to handle that ? The probleme : So far I used the user the system field 'name' for the name and an other custom field for the given name. Here the chance that 2 users have the same name is not negligeable. And the second to register will not be able to register with his name. the solution I see : Like in the back end in case the name already exist add an incremental digit after the name. But that's not realy cool cause the user will not see his exact name.. An other solution I see is two have two custom fiels one for family name and an other one for given name. Thereafter I can concatenate the two values to feed the system field 'name'. their I can still implement the control mentionned above but the chance that two users have the same name is much less. These users will only acces the site through the front end and therefore will use a custom login form. I am sure that there is some best practice on how to handle this. thanks in advance.
  24. HELLO! I'm using $user->isLoggedin() three times on one template (in the head.inc, template-page.php and foot.inc). I'm using a custom login in my template file: // If they aren't logged in, then show the login form if(!$user->isLoggedin()){ // check for login before outputting markup if($input->post->user && $input->post->pass) { $user = $sanitizer->username($input->post->user); $pass = $input->post->pass; if($session->login($user, $pass)) { // login successful $session->redirect($homepage->url); } else { // login error $session->login_error = 'Login Failed. Please try again, or use the forgot password link below.'; } } if($input->post->user && $input->post->pass) { $login = "<p class='error'>" . $session->login_error . "</p>"; } $login .= "<form action='./' method='post'><div class='login'> <input type='text' id='user' name='user' placeholder='Enter your SP Company Code' /> <input class='hidden' type='password' name='pass' value='' /> <p><input type='submit' class='btn' name='submit' value='Login' /></p> </div></form>"; } // end !logged in Using the correct logins works and everything is cool, but putting the wrong passwords in creates a Internal server error on both the head.inc and foot.inc $user->isLoggedin() functions. I'm probably doing something absurdly stupid here, any ideas? thanks
  25. Hello, I have a site with users that have a custom user template setup on PW 2.7.2 stable. Custom user template is "member" and role for those users also "member". The site has a frontend dashboard where users can edit their profile, events etc. I can login with this user type to the backend fine and the permission settings are all working. When I login to the frontend, I get this error: "Fatal error: Maximum function nesting level of '10000' reached, aborting! in .../wire/core/Wire.php on line 333"; I already raised the xdebug.max_nesting_level from 1000 to 10000. When I set it to 100000, the server disconnects. I can see that the user gets logged in with $session->login($uname, $pass) before the error is thrown. EDIT: When I reload the login page after the error shows with the now logged in user, I get this error: "Fatal error: Maximum function nesting level of '10000' reached, aborting! in /var/www/utgpw/wire/core/Fieldgroup.php on line 61" But a $session->redirect($dashboard->url) seems to cause the error. If I logon with a test user that has role "member" but the regular user template, I don't get the error and get redirected to the dashboard fine. All the code in my dashboard template is working. Actually, the whole login and dashboard logic for the frontend is copied from another site where it has been working fine for over a year now. So I guess the problem is related to how the custom user templates are handled in the core. My setup for the custom user template has also proven to work without issues in 2 other sites. I have spent hours on debugging already and now I'm lost. Any ideas that point to the cause of this would be much appreciated.
×
×
  • Create New...