Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 10

HotBlackJohnD5estlealf349141590422 +4 guests

Predefined User-Attributes Extension

13»

Comments

  • Does anyone know if there is a way to add cheboxes to the form? I tried with type=> checkbox but it just displays an input box. Thanks!
  • Hi everybody, is there a way to access the attributes from another extension?
  • Hi all, first of all thank you for the add-on, this is just what I need. Is anyone here know how to show the predefined user attributes in settings.php?PostBackAction=Applicants page, you know the page where you're gonna approve or decline membership applicants? Thank you.
  • I am trying to add another function for SaveIdentity. I found that if another extension calls SaveIdentity the Predefined Attributes field gets emptied.

    Here are the two functions I created:

    /*////////////////////////////////
    // @name: SaveIdentity
    // @description: Adds Predefined Attributes to SqlBuilder in UserManagers SaveIdentity
    // @param: $UserManager (Reference to the UserManager Object)
    // @return: -
    */
    function SaveIdentity($UserManager) {

    $this->GetAttributesFromDatabase();
    $s = &$UserManager->DelegateParameters['SqlBuilder'];
    $s->AddFieldNameValue($this->ColumnName, $this->Attributes);
    }


    /*////////////////////////////////
    // @name: PredefinedAttributes_SaveIdentity
    // @description: called by delegation and 'redirects' to function in class
    // @param: Object UserManager
    // @return: -
    */
    function PredefinedAttributes_SaveIdentity($UserManager) {
    $pa = new PredefinedAttributes($UserManager->Context, $UserManager->User);
    $pa->SaveIdentity($UserManager);
    }
    $Context->AddToDelegate('UserManager', 'PreIdentityUpdate', 'PredefinedAttributes_SaveIdentity');
  • # djcrazysk8er
    It works, but you have to add to the People.Class.User.Manager.php
    this line in the function SaveIdentity, of course before Database->Update.
    $this->CallDelegate('PreIdentityUpdate');

    Index in the appg/database.php is required too.
    $DatabaseColumns['User']['PredefinedAttributes'] = 'PredefinedAttributes';
Sign In or Register to comment.