Jump to content

Can

Members
  • Posts

    350
  • Joined

  • Last visited

About Can

  • Birthday 01/17/1988

Contact Methods

  • Website URL
    http://www.HappyGaia.com

Profile Information

  • Gender
    Male
  • Location
    Perú

Recent Profile Visitors

5,958 profile views

Can's Achievements

Sr. Member

Sr. Member (5/6)

279

Reputation

5

Community Answers

  1. hey guys I'm sorry for being away for such a long time and am unfortunate to say that I'm not able to maintain any of my modules at the moment as I'm not doing any php / pw at the moment myself and don't have a working php/mysql environment locally right now to do anything "quickly" but I would be open and happy if someone else wants to take over any of my processwire modules, by any way, for example by transferring the repo to a new home to have it redirect old links, or you could just upload yourself and i'll include a message in my repo readme and here in the thread @strandoo maybe you are interested in taking over? than you could easily include your suggestions which sound good or just publish yourself and I'll link yours (just a thought, no pressure of cause!) greets
  2. haven't tested it but you should be able to replace this $value->getLanguageValue($user->language) with this $value
  3. @Slav only this gist https://gist.github.com/CanRau/662a559a07d6d7c492159d1cd497944f
  4. @ngrmm just bumped the version to 0.3.2 including a little fix so it show up again, please let me know if it works @CalleRosa40 Just checked on pw 2.8.62 and 3.0.62, cookies are created as expected..have you checked console in dev tools? it should show something..and it could be interesting to check network tab in dev tools, too, to see if it actually sends the ajax request
  5. Could you solve it? Have you tried disabling ajax? I'm really short on time at the moment :/
  6. great info thanks @kixe and @Robin S logging out could be an option..could be a little confusing though..maybe combined with some notification..thought an extra input would be more understandable
  7. Hey guys, I'm building a module to keep a user logged in until manual logout. I know about Login Persist, but this one stopped working for me a while ago and it might not even be compatible with pw3 (haven't tested this) as it's not being updated for 3 years Anyways, the module works, and now I want to secure user edit screens namely ProcessPageEdit (any user template, as there might be multiple) and ProcessProfile by requiring the current password.. I know how to add the additional input (added by hooking into ProcessProfile::execute and ProcessPageEdit::buildForm or Page::render) but I don't know how to intercept the saving and canceling the save if password doesn't match I thought about emptying $input->post (don't even know if this works?) if not valid but would be nice not to loose the changed data but instead just notify user about a wrong password.. would love to get some thoughts and input on this
  8. interesting approach thanks for sharing think the first subselector could be a nice addition to simplify things ;-)
  9. would love that too, could use it on a table field to know while searching if the first/last entry matches
  10. $user = $users->get("email=".$input->post->email('email')); this will email sanitize the email input field value combining WireInput and WireSanitizer ;-)
  11. great idea..thinking about playing with jasonette too but lend my phone to a friend for some days^^ tried you rss reader..home screen is loading but none of the feeds is...loading icon circles infinite?
  12. you don't need another template..you can use urlSegments for this and then if /amp/ is appended to the url you output amp content..without the url segment you can then output normal html which is recommended (to have both)
  13. haven't checked this threat actually, but as far as i understand i'm doing the same?! ;-)
  14. if anyone wants to allow e-mail and name in admin login with PW 3.x (and i guess 2.8) the module from @mindplay.dk wasn't working for me, i guess because ProcessLogin::execute is not pageName sanitizing the name.. this one works for me (PW 3.0.51) and allows either name or e-mail (you could change the name label to reflect this too of course) // change login name input label to e-mail-address $wire->addHookAfter('ProcessLogin::buildLoginForm', function(HookEvent $event) { // on liner as we don't change anything else $event->return->get('login_name')->set('label', $event->_('E-Mail-Address')); }); // hook into session::login to get user by mail $wire->addHookBefore('Session::login', function(HookEvent $event) { // need to get email from $input as processLogin::execute is pageName sanitizing $email = $event->input->post->email('login_name'); // stop here if login_name not a valid email if (!$email) return; // new selector arrays don't seem to work on $user so using $pages here $user = $event->pages->get([['email', $email]]); // if valid user set login name argument if ($user->id) $event->setArgument('name', $user->name); }); i've got those in a _hooks.php included in my site/init.php but you could of course outsource it into a separate module etc..
  15. as far as I know (never used it so far) it works on newly created files only (so after enabling pagefileSecure) and changes file urls, think by adding a hyphen or something which I guess .htaccess blocks already..have a look at wire/config.php excerpt: /** * Secure page files? * * When, true, prevents http access to file assets of access protected pages. * * Set to true if you want files on non-public or unpublished pages to be * protected from direct URL access. * * When used, such files will be delivered at a URL that is protected from public access. * * @var bool * */ $config->pagefileSecure = false; /** * Prefix for secure page files * * One or more characters prefixed to the pathname of secured file dirs. * * If use of this feature originated with a pre-2.3 install, this may need to be * specified as "." rather than "-". * */ $config->pagefileSecurePathPrefix = '-'; to get it working you need to block access by guest role for those templates, have a read at https://processwire.com/talk/topic/5292-proctecting-files-from-non-logged-in-users/ might be of interest: https://processwire.com/talk/topic/15622-pagefilesecure-and-pageispublic-hook-not-working/
×
×
  • Create New...