The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpanel pw strength outside of cpanel?

Discussion in 'cPanel Developers' started by Mr_Butter, Sep 16, 2009.

  1. Mr_Butter

    Mr_Butter Registered

    Joined:
    Oct 14, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have a script which allows users to change their email passwords. Is there a way to include the cpanel password strength bar in that page? I played around for a bit to include some of the JS but it was a no-go.

    Right now a lot of users submit the form but the pw doesnt get changed because it isnt strong enough (but the site isnt telling them how strong it is...)

    Any way to get this done?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    passwdstrength::get_required_strength( hash )
    API Version: 2
    Description: Get the minimum strength required set by WHM
    Parameters
    app => string
    this is the name of the application that the minimum strength is being checked for.

    Return:
    $VAR1 = {
    'strength' => int indicating lowest strength
    };
     
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    PasswdStrength::get_required_strength( hash )
    API Version: 2
    Description: Get the minimum strength required set by WHM
    Parameters
    app => string
    this is the name of the application that the minimum strength is being checked for.

    Return:
    Code:
    $VAR1 = {
              'strength' => int indicating lowest strength
            };
    alternatively via the xml-api:

    /xml-api/cpanel?user=cptest&cpanel_xmlapi_module=PasswdStrength&cpanel_xmlapi_func=get_required_strength&app=ftp

    Code:
    <cpanelresult>
      <apiversion>2</apiversion>
      <data>
        <strength>10</strength>
      </data>
      <event>
        <result>1</result>
      </event>
      <func>get_required_strength</func>
      <module>PasswdStrength</module>
    </cpanelresult>
     
    #4 MattDees, Sep 16, 2009
    Last edited: Sep 16, 2009
Loading...

Share This Page