Jump to content


User Registration Snippet


7 replies to this topic

#1 doze

    Etomite Forum Fan

  • Member
  • Pip
  • 119 posts

Posted 06 December 2005 - 11:45 PM

Hi,

I was wondering, that is there a snippet that enables user registration? What I mean is, that visitors could create an etomite account for them selves and possible have an email account verification in it.. and CAPTCHA verification.

Have anyone done anything like this that I could have a looksie? I'm going to make one (if none available allready), but I could use some starting point.

Any thoughts?

#2 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 07 December 2005 - 12:23 AM

There is no starting point, sorry

#3 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 07 December 2005 - 04:35 AM

As I have mentioned in another forum thread I will be releasing front end CAPTCHA code capabilities in the near future... I will be addressing this issue once I have fixed as many remaining minor bugs in the current code base in an effort to release 0.6.1 Final... RC3 introduces front end login and logout which still needs to be documented but the CAPTCHA code portion couldn't be completed within my self imposed release time frame... :eto:

#4 doze

    Etomite Forum Fan

  • Member
  • Pip
  • 119 posts

Posted 07 December 2005 - 05:53 PM

Ralph (rad14701), on Dec 7 2005, 07:35 AM, said:

RC3 introduces front end login and logout which still needs to be documented but the CAPTCHA code portion couldn't be completed within my self imposed release time frame... :eto:
What do you mean with "RC3 introduces front end login and logout"? Do you mean, that the frontend and backend have their own sessions now? Or is there a ready "frontend login" system in the api to use, or something? Will you make a snippet for this? I thought that I'd start with the MemberLoginSuite that you've made, but I'll wait if it's "out dated" allready.

It is also good to hear, that CAPTCHA will be usable in the future. Do you have any suggestions on how to achieve the account registration verification via email? Have you thought of including that in etomite's user management?

#5 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 07 December 2005 - 06:27 PM

doze, on Dec 7 2005, 05:53 PM, said:

... Will you make a snippet for this? ...

see this disscussion but note there are some bugs present in RC3.

#6 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 07 December 2005 - 09:08 PM

doze, on Dec 7 2005, 01:53 PM, said:

What do you mean with "RC3 introduces front end login and logout"? Do you mean, that the frontend and backend have their own sessions now? Or is there a ready "frontend login" system in the api to use, or something? Will you make a snippet for this? I thought that I'd start with the MemberLoginSuite that you've made, but I'll wait if it's "out dated" allready.

It is also good to hear, that CAPTCHA will be usable in the future. Do you have any suggestions on how to achieve the account registration verification via email? Have you thought of including that in etomite's user management?
When doing a fresh install of RC3 you will find there there are several new snippets... I haven't had a chance to write in-depth documentation for them as yet but there is a new snippet called EtomiteLoginOut which can be used in conjunction with user roles... I have included the snippet code here for now... This snippet makes use of several new API functions including checkPermissions(), userLogin, and userLogout ... The functions are documented in your index.php file...

// EtomiteLoginOut Snippet
// Etomite 0.6.1 RC3+ Required
// Created By: Ralph A. Dahlgren
// Last Updated: 2005-11-10
// Performs user login and permissions assignment
// Intended to be used in conjunction with (NEW) $etomite->checkPermissions($action,$user,$id)
// And combination of the following variables can be sent
// Defaults to current document on return
// Usage: [!EtomiteLoginOut?url=http://etomite.com&id=5&alias=EtomiteForums!]
// Or: [!EtomiteLoginOut!] to simply login prior to accessing secure areas
// Any combination of the following variables can be mixed and matched as desired
// $url   = and fully qualified URL (no validation performed)
// $id    = an existing document ID (no validation performed)
// $alias = any document alias (no validation performed)

if($_POST['action'] == "Login")
{
  $etomite->userLogin($_POST['username'],$_POST['password'],0,$url,$id,$alias);
}
if($_POST['action'] == "Logout")
{
  $etomite->userLogout($url,$id,$alias);
}
return '
<div class="contentBox1">
  <p>&nbsp;</p>
  <form name="login" action="#" method="post">
    <table>
      <tr>
        <td><b>Username:</b></td>
        <td><input type="text" name="username" id="username" value="'.$_SESSION['shortname'].'" /></td>
      </tr>
      <tr>
        <td><b>Password:</b></td>
        <td><input type="password" name="password" id="password" value="" /></td>
      </tr>
      <tr>
        <td></td>
        <td class="alignCenter">
          <input type="submit" name="action" id="action" value="Login" />
          <input type="submit" name="action" id="action" value="Logout" />
        </td>
      </tr>
    </table>
  </form>
</div>
';


#7 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 01 January 2006 - 11:54 PM

minor issue - EtomiteLoginOut fails XHTML validation as the same ID is used for both the login and logout buttons.

#8 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 02 January 2006 - 12:15 AM

mikef, on Jan 1 2006, 07:54 PM, said:

minor issue - EtomiteLoginOut fails XHTML validation as the same ID is used for both the login and logout buttons.
Good catch, mikef... :betterwink:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users