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 it possible to delete and edit pages from the frontend? Because I know its possible to create pages via the API from the Frontend. Even when the user role only has view permission and not edit permissons. creating pages: https://processwire.com/talk/topic/352-creating-pages-via-api/ https://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/
  2. Hi, I'm working on a simple Ionic app which is going to use ProcessWire as the backend. This app allows people to upload images and then like/comment on them. It's a lot like a stripped down imgur app. I've set up some basic services such as register, login & reset password. There are a couple of things I am doubtful about. 1. How do I get user's unique session Id once he's successfully authenticated through AngularJS's http post request? I'm currently using following code: $sessions = $session->getAll(); $session_id = $session->_user["fingerprint"]; But I'm not sure if that's the right way to do it. I'm not even sure if that's the session id. I know there's something called SessionCSRF["name"], I tried that. I'm sending session_id as response to http post request. Then I'm using that session id to check if user is authenticated for his/her further actions such as commenting/liking/posting etc. 2. Now that I've got the session id, how do I identify the user based on the given session id? or should I send user ID back to PW everytime user is performing any action? Is it possible to identify user just based on the session fingerprint that I'm giving back to the app? Among other things I'm considering are keeping a device id on the server for each user, so as to gain better control over user's sessions. I can log out all the devices linked at once etc. I'd really love to hear from you guys how you'd plan to do this app. I'm experienced with PW but not very much with AngularJS. Thank you.
  3. Hi everybody, I just ran into a quite pressing problem: I don't see a possiblity to allow a user group from deleting a page but grant them access to edit it. Did I look over something here or is there already a module to add this functionality that I didn't find? With kind regards, Marc Edit: Sorry, I missed the most crucial point in my initial question... What I want to do is grant a group permission to delete pages of one template but not another one: delete permissions on a per template basis. I still want to grant the edit right for templates, that can't be deleted. I hope this is more understandable now...
  4. Hi everyone, sorry if this is a duplicate question but I cannot seem to find the proper way to achieve what I want. I need a way to store and retrieve the datetime of users' last login so that I can display a list of pages that have been updated since the user was last logged in. I've been trying to accomplish this with hooks but I can't figure out where to store the login date. I feel like I should be able to do this with just $user->get and $user->set, but it seems like these only hang around during the current session? Do I need to extend the User class in a module or is there another way to add a field to the User class? Thanks in advance!
  5. Hello everyone, I'm working with ProcessWire now for more than two years and I'm verry verry satisfied with it! Currently I'm working on a project with integrated "Frontend CRM" and more functions for frontend-user-interaction. The Contacts for the CRM are Users with an alternate parent (as introduced in 2.5.14). Almost everything is working perfect so, but now I have one Problem: When a new user is created via the Frontend (via the great PW Api) it's parent has an name like "/en/crm/contacts/maxmustermann/" In this case the new created contact is only visible, if the Editor has "english" as language actived. In other languages (currently only German) the new Contact isn't shown. Here's the codepart, where the page is created: $c_template = $templates->get("contact"); $c_parent = $pages->get(1018); $c_name = $sanitizer->pageName($c_forname) . $sanitizer->PageName($c_lastname); if ($pages->get("name=$c_name")) { $date = date("ymdhis"); $c_name = $c_name .$date; } $nc = new Page(); $nc->template = $c_template; $nc->parent = $c_parent; $nc->name = $c_name; $nc->language = $user->language; $nc->contact_forname = $c_forname; $nc->contact_lastname = $c_lastname; $nc->contact_company = $c_company; $nc->contact_website = $c_website; $nc->contact_email = $c_email; $nc->contact_phone = $c_phone; $nc->contact_street = $c_street; $nc->contact_plz = $c_plz; $nc->contact_town = $c_town; $nc->contact_country = $c_country; $nc->email = $c_email; $nc->save(); The input values are validated before this part. I want the contact to be visible in all languages. How can I solve this problem? Many thanks in advance! Greets, Josh
  6. This is a strange behaviour I'm getting, tried with v2.5.3 and now with v2.5.22. I create a user, enter all the details including correct password, click on publish and I'm getting this error message: Saved Page: /admin/access/users/test/ - Cannot be published until errors are corrected I tried to delete the user and recreate it, create a different user name, no luck. I' can't figure out what is wrong as this is supposed to be a pretty simple task to do and there's no topic on this error. Edit: This user "test" was working before but now is unpublished Could someone please direct me to the right direction? Thanks
  7. Hi all, I know I can get the current user navigation language using this query: $currentUser = $pages->get("template=user, id=".$user->id); $currentUserLanguage = $currentUser->language->name; or directly: $currentUserLanguage = $user->language->name; Now, if I am viewing the site with this user and change navigation language using the language switcher the value of $userLanguage changes accordingly. However, the REAL user language as seen in the user profile on the admin panel doesn't change. So, my question is: how can I get the user profile language as set in the user profile? Thank you!
  8. Hello, I want to add a custom method to the user object and need to pass some data ( an array called $params) to the method when I call it. I will call the method like this $user->saveprofile($params); The method takes that data and saves it to a user profile page. Only I don't know how to pass that data to my custom method. This might be a silly question. Please forgive me, but I am fairly new to OOP and PW modules/hooks development. This is what I have so far (taken off examples from here): public function init() { // init() is called when the module is loaded. $this->addHook('User::saveprofile', $this, 'UserSaveProfile'); } public function UserSaveProfile($event) { //how to pass my $params array to this method // Get the user object $user = $event->object; // get user data - this is where I am stuck $userData = // condition and actions if($user->hasRole("frontend")) { //create and save user profile page $this->message("Userprofile page for user " . $user->name . "has been created"); } } I tried to find examples of how to do that but could not find anything related in the forum. Any help would be appreciated. Thank you.
  9. Good day! I am building a subscription based site. I created additional template for subscribed users. When I create a user he is created unpublished with the same pass for all. When the payment is completed, the status is changed to published via API. It works as expected. But when I try to publish a user from the admin, I am asked to input a password, though it already exists in the database. Each time I unpublish/publish a user from the admin I have to change a password. Is this a normal behaviour or a bug? Can it be overriden somehow as this is not desired behaviour for my case (I want to let admin publish a user without changing password)?
  10. Hi! I am building a site where there is another user-template as introduced in 2.5.14. (http://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users) For now, you have to add the parents of the users with the new user-template manually like so: $config->usersPageIDs = array(29, 1026, 1027); But I have dynamically growing pages which hold the new users, like so: Home Members Group User User Group User User ... ... Ryan mentioned they're working on automating that process, but I wonder how I could accomplish this now. Naively I tried to fetch the parents like so, directly in config.php: (I'm quite novice ) $those_pages = $pages->find("template=that_template"); But that failed - nothing got rendered. Then, I thought I could do that in the site template files. But that would be too late, I guess? Also this approach would be useless for the backend... and I guess I don't need this configuration for the fronted anyway!? Now I wonder where would be the right hook to some function in the right time to accomplish this? Or any other solution? Hope you get what I mean ...
  11. Hello together, this is my first post in this forum. I like to do the following: I have some users, let’s say 20-30 people that should only be able to edit their own pages. By using the "Page Edit Per User" module it’s mostly working in this way, that the user can edit his own page, okay. The problem is, that the user must be given the rights to add children pages, edit and sort them in the page tree inside "his" main page and it seems that the "Page Edit Per User" module is just limited. Let me give you an example. I have the following tree: Home Page 1 - Children 1.1 - Children 1.2 - Children 1.3 Page 2 - Children 2.1 - Children 2.2 - Children 2.3 . . . So, I also have two users: User 1 and User 2. User 1 needs to be the following rights: Edit, Delete, Move all children pages for Page 1 all other actions are not allowed. So, User 1 can NOT delete his main page, Page 1 or any other page "outside" Page 1. Any ideas on how to solve that? Thanks so much in advance for your ideas. -Thomas
  12. Hi, is it somehow possible to add new users as children of other users? I want to group users and thought that would be a nice structure to have groups of users put together as children of other users. Basically like: Users Group A User 1 User 2 User 3 Group B User 4 User 5 User 6 User 7 ... I edited the user template to be able to have children and parents of user-templates - yet, whenever I add a child to a user it automatically will be appended to the 'Users' page. Also I cant move them from there, it says "You do not have permission to move pages using this parent - /backend/access/users/group-a/" Couldn't find a solution so far - I think there is some intention behind it, because it is some admin/system stuff - but couldn't it be made possible? -Steffen
  13. Hello, I want to build a site where people can *only* login with Google and/or Facebook (no registration possible). When someone connects with G+|FB I'd like to check if the ID is present in my Userlist and if not, create a new user with all the data I can get. Now I'm asking myself (and you) how I can log the user into PW, since I won't have a password and the username they got on FB|G+ might even change. I need to find those accounts by the FB|G+ ID. I thought either to create a new user with username/pass = G+|FB-ID and a field stating if it's G+ or FB. The other way would be to have a way to select and login a user via a unique ID field, but i can't find something like a "loginByCondition" method in PW. So I guess my questions are: -is there a way to login users other than user/pass? - which way would you suggest to build a system like that? My problem with the "user and pass == G+|FB-ID"-approach is that it smells like dirty hack and I couldn't, for instance, connect my own admin account with FB or G+ to make it work in front- and backend. Any help and thoughts are appreciated! Thanks, thomas
  14. Hello, i have managed to login and logout and change password for user from PW front end with the help of https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/ many thanks to @ryan but now i need it little advance 1. i want to have option for login users to save some pages as FAV and can see in their profile. how exactly i can do that ? do i need to create some fields in users Template , how login users can press button on page to put as FAV & if he is not logged in it goto LOGIN Page. 2. and User Name and Phone Number and Pic in user profile. Thanks
  15. I'm working with a PW 2.5.3 install. Here http://processwire.com/blog/posts/processwire-core-updates-2.5.14/ there is a quick tutorial on setting up an alternate user template and parent. I followed it to the T, but it didn't work; when adding a new user, there was no choice of template, and once the user was created the alternate template I had set wasn't even among the select options. Has anyone managed to do this or even just an alternate template successfully? The alt. tpl. is what I rly. need... I just tried it twice over and then erased and undid everything 2x too, so... Then I only unchecked "Don't allow pages to change their template?", cloned user template (id=75), added "$config->userTemplateIDs = array(3, 75);" to config.php created a new user No alternate template option still. This should be able to work right? Because I don't see a date for that blog post but do only see comments from 5 days ago, but it says 2.5.13, I'm using 2.5.3.
  16. I have a page field "office" that should appear only on users with the role "broker". So, I put under Visibility for the field, Show this field only if roles*=1075. It doesn't show without the asterisk. But when I try to update a user with an office selected, I get error message up top: "Profile not saved". Anyone know why? Update: See replies #5 and 6
  17. Hi, I have setup a system where users can login at the frontend. For this I customized the user template, add lots of needed fields there, grouped by tab. So on the user page there is: * Content Tab * Tab Group 1 * Tab Group 2 * etc.. Now, I need to create some sort of a detail table Say, Each user has an Employee ID, and the attendance table's field are more or less like this: * EmployeeID * Date * Month * Year * AttendanceStatus I'm thinking of creating a template for this, each record as a page. with the user as it's parent ( If there are better ways to do this, please advise) For the administration part, I wish to embed an "Attendance" Tab on the User Page. In that tab, I'd like to embed Lister, listing that user's attendance. Any hint or advice on how I can achieve this ?
  18. Hi, I've just set up a client area with ProcessWire based on Ryans step by step guide here - It's pretty much identical, client areas are rendered depending on the users name. This means I can only have one login per client since users names must be unqiue. Often there's time where I have multiple contacts for one client and ideally I'd like to create a user login for each person involved. One login per client works, but ideally I'd like a unique login based on their email address. Is there a way to allow users to login using their email address and using a users name more than once? No worries if this isn't acheivable, I'm extremely happy with PW and have been very impressed at how easy it is to use. To all those involved, great work! Cheers
  19. Hi, We're building a website for translators. Each member of the company has his page with a lot of fields. I would like to associate this page to the userID of each member. I don't see a way to include a field in that profile to choose the userID. Each member of the team will be also able to write blogs. I have seen the Blog module and, in there, several fields have been added to the profile page. How is it feasible?
  20. Hi there, can't seem to get my head around handling user timezones the right way and hope to get some feedback from people more knowledgeable than me. My scenario: Users can set publishing date/time for pages they create through a frontend form. These should be saved in the users' timezone. I have a date field for publishing time. PW saves dates as unix timestamps to the DB. For conversion of the date/time to the timestamp PW uses the default server time zone setting (in my case Europe/Berln). Now when a user in timezone America/New_York creates a page and sets the publishing date, it will be converted to a timestamp using the server timezone Europe/Berlin and saved to the DB. Later the user checks if his page is being published at the set time in New York. But it will be published at the wrong time because the user is in a different timezone. I assume it would be best to convert the publishing date/time to a timestamp using the user timezone and save that to the DB. Am I right here? How would I accomplish that? I found date_default_timezone_set. Can I simply use this to set the user timezone before I save values, like date_default_timezone_set($userTimezone); // where $userTimezone is a string like "America/New_York" $editpage->of(false); foreach($adform as $field) { // loop through all fields and save them if(in_array($field->name, $ignorefields)) continue; $editpage->set($field->name, $field->value); } $editpage->of(true); date_default_timezone_set($config->timezone); // do I have to set it back to server timezone here?
  21. Hi all, I'm struggling in putting together a process module. I want to trash all pages that belong to a specific user after the user has been deleted. I found one related thread by onjegolders where he is doing things the other way around. In my case I need a process module that hooks after user delete. And I would like to use the wire/modules/Process/ProcessPageTrash.module. It is my first time creating a pw process module. I have read through the basics of creating modules including the wiki article and looked at the code of ProcessPageTrash.module. But I'm having a hard time putting things together. This is what I've got so far: class ProcessCleanupUserPages extends Process { public static function getModuleInfo() { return array( 'title' => 'Cleanup User Data', 'version' => 0.1, 'summary' => 'Deletes all pages that where created by a user after user has been deleted', 'singular' => true, 'permanent' => false, 'permission' => 'user-admin', 'requires' => 'ProcessPageTrash', 'autoload' => "process=ProcessPageList", // What to add here - autoload only on user list page ); } public function init() { $this->users->addHookAfter('delete', $this, '___execute()'); // is this correct? } public function ___execute() { //get user ID $userID = $this->id or $event->id // How to get the user ID? //get all pages that were created by the deleted user $userPages = $pages->get("created_users_id={$userID}"); // syntax for trash pages - call module ProcessPageTrash on $userPages } protected function render() { // print out message to admin after pages are successfully trashed } } ?> I added comments with "???" where I don't know exactly what to do. Any help would be much appreciated. Thank you.
  22. Hey guys, I'm new to PW. I'm trying to make a website where my clients can signup/login and set up their profile. Also, their customers have to be able to signup/login and view their profile. Basically, i have clients that will login and set up their own information in the website. Details included will be something like company name address contact info product image product description price Once my clients log in and input this information their customers can go to the client's web page and view the information and purchase items. So i basically need to know how to set up the users so that: clients can sign up and input their information which will output to a web page customers can log in and see the clients information where they can purchase items is there a module that caters for this already? Does the PW database cater for this? Any information on how to do this would be greatly appreciated! Regards, Nick.
  23. Hello, I'm trying to create a template that have a field for storing what user modified it. So when editing a page I could have a Single Selection for users. I used a page field with a parent of Users. but when I try to save it says " Page 3234 is not valid for owner" Thanks for any help.
  24. processwire out of the box, a user with only username, email address, password and roles. I'm going to create a user registration form, how to add more fields on the basic user object ? like gender, telephone, twitter account, and so on. Put it simple, could I extend processwire users with more fields ?
  25. Hello, I'm wondering if this aproach is correct, had not been tested yet. What I'm trying to do is Log In an user from one browser and keep the user logged in a different browser. example: I have an app and send a login command to a processwire backend, the backend respons with the user id if the login was successful. http://example.com/login POST (encripted): username password response: 123 The code begin could be $username = $input->post('username'); $password = $input->post('password'); $user = $session->login($username, $password); if($user){ echo $user->id; } Then I read the User Id and open a new browser like this http://example.com/user/123 And the website checks if the user is logged in and opens a section only for logged in members. because PW saves the sessions in the server I think this could work. The code for this would be $userId = $input->urlSegment1; $user = $users->get($userId); if($user->isLoggedin()){ $session->redirect('/private/'); } else { $session->redirect('/'); } Thanks in advance
×
×
  • Create New...