[development] core user_login customization -- getting breakout theming AND custom validator working at the same time?

Ben DJ bendj095124367913213465 at gmail.com
Wed May 19 22:23:59 UTC 2010

Hi again Lee,

On Wed, May 19, 2010 at 2:45 PM, Lee Rowlands
<leerowlands at rowlands-bcs.com> wrote:
> Have you given thought to adding a '#theme' attribute to the form in
> hook_form_alter

I'd looked at, but, tbh, I'm not at a point yet where I've
'internalized' this enough to make a sound decision.

Seems that there's almost _always_ another way to do it ;-)  I'm
bouncing around from doc snippet to doc snippet, generally getting
each one working relatively quickly & easily.  That's good.  Trying to
stitch this all together is proving challenging so far ... waiting for
the 'lightning bolt'!

I'll share the overall context of what I'm trying to achieve here --
and ask for comment as to approach.

Here we go:

I want to change the process workflow of form submission & user auth,
using, as much as possible, available core tech'y & modules.  Using
'Search' as an example action:

I've 3 user roles,


On front page, display search bar/box any/ALL users

@ text entry & Submit of search, interrupt/redirect BEFORE submitting
to search backend,

	'store' original search criteria

	check logged in state
	(1) if LoggedIn as RegisteredMember
			push original Search to search backend
			present search results
				include advanced_search option to modify/filter/resubmit search in
search result form.
	(2) if LoggedIn as VerifiedHuman
			display selector
			(a) LogIn as RegisteredMember
					continue @ (1)
			(b) Create new Account
					exit search to launch (User Reg) process
			(c) Continue as VerifiedHuman
					present simple/unmodifiable search results

	(3) if !LoggedIn, currently Anonymous
			display selector
			(a) exit to home page
			(b) display/submit (re)Captcha
					(i)  if success
							continue @ (2)
					(ii) if fail >= 3x
							ban IP from Search form access for 180 min.
							exit to home page

To get 'this' done, I'm hoping to leverage as much as possible of
core's user.module & contrib'd Captcha.module.

I've also started looking at core's Trigger, and contrib Rules.module
-- but am not convinced they're helpful, or not.

So, that said -- is your suggestion of '#theme' still a good approach?
 In the meantime, I'll dig @ http://drupal.org/node/751826.



More information about the development mailing list