Jump to content

baba_mmx

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

1,354 profile views

baba_mmx's Achievements

Newbie

Newbie (2/6)

33

Reputation

  1. Hi, next week I'll take some time off and I'll check for that problem
  2. Unfortunately at the moment I'm unable to work on this. Maybe someone in the forum can take it under his wing?
  3. Added registration with confirmation email and activation link I've mainly followed this thread https://processwire.com/talk/topic/4066-activate-user-account-via-email/ The user who registers is created with the unpublished status: $new_user->addStatus( Page::statusUnpublished ); and when she/he clicks on the confirmation link received via email the status turns published: $activate_userid = $this->sanitizer->text( $this->input->get->userid ); $activate_hash = $this->sanitizer->text( $this->input->get->hash ); $this_user = $this->wire('pages')->find( "template=user,id=$activate_userid, include=all" )->first(); if ( is_object( $this_user ) && isset( $this_user->id ) ) { if ( strcmp( $this_user->activation_key, $activate_hash ) == 0 && $this_user->is( Page::statusUnpublished ) ) { echo __( "Thank you! Your account has been activated!" ); $activate_user = $this_user; $activate_user->of(false); $activate_user->activation_key = "0"; $activate_user->removeStatus( Page::statusUnpublished ); $activate_user->save(); } } In the attached pic the configuration page which allows to specify email's fields. As a side note, I've initially tried to get the user with his username: $this->wire( 'users' )->find( "name=$activate_username, include=unpublished" ); but the returned object was really complex and completely protected, so I've changed the behaviour using the user's id.
  4. Ok here we are - fixed version number. Thanks cstevensjr, done. @BernhardB - don't worry APP ID/Secret are fakes
  5. Thanks dudes. I've fixed the version number. Now a couple of informations: in the providers config file can be specified all providers supported by HybridAuth. For now we have enabled and tested just Facebook and Twitter, and enabled Google but not tested yet (but if it works for "i" and i+1 it should work also for i+N). Each provider will be shown as collapsed fieldset, if not enabled, to save space. Attached, there is a picture of this. This configuration file is used for: create the module edit section (as shown in the above picture) show enabled providers in the login form (see) retrieve info to be processed when the user is doing a login with a certain provider (see) Naturally more providers can be added, following the structure of the returned array.
  6. Hi, first of all I'd like to thank you all, and in particular Ryan, for this great project which is ProcessWire. I'm using ProcessWire for the first time and frankly I'm finding it quite good, despite my lack of experience. Anyway, I created this post to introduce you the following module, on which we are working, and I'd like to share it with the community which could benefit from it and maybe improve it. You can find the module here: https://bitbucket.org/mauro_mascia/processwire-social-login/ Basically, it adds the ability to allow a social login (using the HybridAuth library - https://github.com/hybridauth/hybridauth) as well as a standard login, user profile and registration. The module is clearly not complete and it is at its first stage of maturity and I hope you can forgive me if I have not fully complied with the PW best practices
  7. Old topic but maybe can be useful. What about adding a global variable? Like this: $port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':' . $_SERVER['SERVER_PORT']; $protocol = ($_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://'; if(!$config->siteURL) $config->siteURL = $protocol . $_SERVER['SERVER_NAME'] . $port . '/';
×
×
  • Create New...