Advertisement:

Author Topic: {VALIDATION_LINK} does NOT work  (Read 1215 times)

lexosc

  • Sr. Member
  • ****
  • Posts: 344
{VALIDATION_LINK} does NOT work
« on: November 22, 2013, 03:44:05 pm »
Hi validation link tag does't work it just shows {VALIDATION_LINK} in email tested with default osclass 3.2.2 anyone know what could cause this?

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Re: {VALIDATION_LINK} does NOT work
« Reply #1 on: November 22, 2013, 03:48:48 pm »
Ok this was fast i found the answer. ill leave it here maybe someone have same problem in the feature

if you copy and paste the {VALIDATION_LINK} from other template you have then it will not work. you have to copy this directly from the sidebar of email template where Legend is shown OR maybe it was the . dot i had at the end of the tag OR it wasn't bold? i am not sure

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: {VALIDATION_LINK} does NOT work
« Reply #2 on: November 22, 2013, 06:38:13 pm »
did you get a legend key to work in another email template?

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Re: {VALIDATION_LINK} does NOT work
« Reply #3 on: November 23, 2013, 11:24:01 am »
only where it already exist at side bellow "Legend" i think i had problem where in verification template the validation_link tag wasn't there

sarathgavani

  • Newbie
  • *
  • Posts: 3
[Solved] Re: {VALIDATION_LINK} does NOT work
« Reply #4 on: October 09, 2017, 11:56:53 am »
There is a way to get validation_link get work in another email template. you need to update the funtion in oc-includes/osclass/emails.php

lets say we add this validation link in email_admin_new_user email template.

now go to emails.php file and find the above funtion and you will find the same name with fn_email_admin_new_user

there you need to add the validation_link & validation_url variable to the array. so change the below line in fn_email_admin_new_user


update the below before code with after code.

Before:

if( !is_null($content) ) {
            $words   = array();
            $words[] = array(
                '{USER_NAME}',
                '{USER_EMAIL}'
            );
            $words[] = array(
                $user['s_name'],
                $user['s_email']
            );

After:

if (!is_null($content)) {
            $validation_url = osc_user_activate_url($user['pk_i_id'], $user['s_secret']);
            $words   = array();
            $words[] = array(
                '{USER_NAME}',
                '{USER_EMAIL}',
                '{VALIDATION_LINK}',
                '{VALIDATION_URL}'
            );
            $words[] = array(
                $user['s_name'],
                $user['s_email'],
                '<a href="' . $validation_url . '" >' . 'Validation Link' . '</a>',
                $validation_url
            );
         
Done.......
« Last Edit: October 09, 2017, 01:34:36 pm by sarathgavani »