Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for MongoDB. Note: You need to update DoctrineModule becau... #3

Merged
merged 1 commit into from Jan 13, 2012
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2012

...se I added support for file_extension modifications.

…cause I added support for file_extension modifications.
@EvanDotPro EvanDotPro merged commit f31d5b3 into ZF-Commons:master Jan 13, 2012
@EvanDotPro
Copy link
Member

Merged, thanks!

@danrossi
Copy link

Uhhh you guys rock, I had started on some hacks and had it working. Is this refactored to DoctrineModule now ? Is there a refactored DoctrineODMModule yet ? If not I can send a diff of one.

@danrossi
Copy link

I have some extra additions if you like I will create a diff, one is using getClientIp to get the client ip address via proxies, messages returned to the login form, honeypot form field option, captcha element config to configure recaptcha, csrf timeout config etc.

It seems there is still a requirement to have the ORM module loaded or else it wont be able to find the entitymanager.

works perfectly.

Is this function required for ODM also ?

attachDoctrineEvents

@EvanDotPro
Copy link
Member

I still need to evaluate if the resolveEntityListener is a good idea for the ODM. The idea behind that was to allow other entities to simply set the UserInterface as the target entity, then it will dynamically swap that with the class that is actually being used as the user entity (in the case you're using your own, etc).

@danrossi
Copy link

Oh right, yeah I didn't get that entity wrapping stuff. I basically extended my own documents with the required metadata docblock or is it not required to work ? I need to extend it to add some embedded documents instead of referencing, i think it will be better that way for some things. As you can see if i can hack up the social login integration, it will add the extra profile data to the SocialProfile document, or thats what I had in mind, so it can lookup the specific oauth_id instead.

namespace Namespace\Documents;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM,
ZfcUser\Document\User as ZfcUSer;

/** @odm\Document /
class User extends ZfcUser
{
/
* @odm\Id(strategy="INCREMENT") */
protected $userId;

/** @ODM\String */
protected $username;

/** @ODM\String */
protected $password;

/** @ODM\String */
protected $email;

/** @ODM\String */
protected $firstname;

/** @ODM\String */
protected $lastname;

/** @ODM\String */
protected $displayName;

/** @ODM\Date */
protected $lastLogin;

/** @ODM\String */
protected $lastIp;

/** @ODM\Date */
protected $registerTime;

/** @ODM\String */
protected $registerIp;

/** @ODM\Int */
protected $active;

/** @ODM\Int */
protected $enabled;


/**
 * @ODM\EmbedOne(targetDocument="SocialProfile")
 */
private $social_profile;

/**
 * @ODM\EmbedOne(targetDocument="Player")
 */
private $player;


public function __get($property)
{
    return $this->$property;
}

public function __set($property, $value)
{
    $this->$property = $value;
}

}

@danrossi
Copy link

Cannot figure out how to post a diff but these are some things you might be interested in ;)

http://dl.dropbox.com/u/3394987/zfcuser.diff

I will likely need to extend the registration form anyway, and possibly therefore the usercontroller, ie terms and conditions. will have to investigate the social login integration, or port the EdpUserSocial over, however the new social user has to be sent to the registration form first to fill in extra details and confirm via email.

There was some other features i want to integrate, some spam ip / username / email checking api server like they have with invisionboard. The captcha, csrf and honeypot may enough, but spammers will still get through especially when using yahoo and gmail emails !

http://www.invisionpower.com/products/spammonitor/

And brute force / flood protection on the login system.

@EvanDotPro
Copy link
Member

This is all stuff I plan on doing and supporting via additional modules. Could you join us on Freenode IRC channel #zftalk.2? I would love to discuss some of your ideas and some things it sounds like you're interested that I'm already working on (social integration with support for the user to fill in missing fields in an additional step, etc).

@danrossi
Copy link

For sure mate I will jump on in a little bit ;)

@danrossi
Copy link

Ajax validation might be also a good one, and style it so the messages come to the side of the elements like alot of places do. And some extra anal password validation like numbers , letters and symbols.

EvanDotPro added a commit that referenced this pull request Mar 7, 2012
@agustincl agustincl mentioned this pull request May 14, 2012
Danielss89 added a commit that referenced this pull request Apr 16, 2014
@foush foush mentioned this pull request Oct 31, 2014
@stijnhau stijnhau mentioned this pull request Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants